Bug 71955 - mkcatdefs I built from sources fails with segmentation fault
Summary: mkcatdefs I built from sources fails with segmentation fault
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openmotif21
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-20 13:29 UTC by Sysoltsev Slawa
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-20 13:29:58 UTC
Embargoed:


Attachments (Terms of Use)

Description Sysoltsev Slawa 2002-08-20 13:29:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
$(unpacked_source_rpm)/localized/util contain source of mkcatdefs I've tried to 
build. But built version of mkcatdefs fails with segmentation fault on any 
input file.
I investigated the error and found that in function "static void mkcatdefs(char 
*fname)" : mkcatdefs.c : line 265 you are trying to allocate local array 'line' 
with MAXLINELEN elements. MAXLINELEN is defined here as NL_TEXTMAX. But in my 
system NL_TEXTMAX is defined as INT_MAX in /usr/include/bits/xopen_lim.h. 
INT_MAX in turn is defined equal 0x7fffffff. So you are trying to allocate 
2*2Gb length local variable! Executable fails doing it.

I changed MAXLINELEN to more reasonable value (8192 looks OK) and mkcatdefs 
becomes OK.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Unpack openmotif21-2.1.30-1.src.rpm to some local dir
2. Prepare sources (rpm -bp openmotif.spec)
3. cd to BUILD/motif/localized/util directory
4. `xmkmf && make`
5. `ls > messages`
6. `mkcatdefs slawa.h messages`
	

Actual Results:  Segmentation fault


Expected Results:  Imakefile
Makefile
messages
mkcatdefs
mkcatdefs.c
mkcatdefs.c.pl3
mkcatdefs.o
mkmsgcat
mkmsgcat.c
mkmsgcat.c.pl3
mkmsgcat.o
slawa.h
mkcatdefs: No symbolic identifiers; no slawa.h created

Or something like...

Additional info:

Comment 1 Ngo Than 2002-08-26 22:50:32 UTC
It's fixed in 2.1.30-6. Thank you for the info.


Note You need to log in before you can comment on or make changes to this bug.