Bug 71955 - mkcatdefs I built from sources fails with segmentation fault
mkcatdefs I built from sources fails with segmentation fault
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: openmotif21 (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-20 09:29 EDT by Sysoltsev Slawa
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-20 09:29:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sysoltsev Slawa 2002-08-20 09:29:54 EDT
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 18:50:32 EDT
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.