Bug 4380

Summary: makedepend crash with a FPE
Product: xorg Reporter: Vincent <leligeour>
Component: Lib/XauAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: high CC: mharris
Version: 6.8.2   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 1690    
Attachments:
Description Flags
First patch (just checking for division by zero) ajax: 6.9/7.0+

Description Vincent 2005-09-07 03:09:54 UTC
When compiling Xorg makedepend crash in libs/Xau.
All flags are strip (no march, no -f*). -02 is the only remaining flag.

makedepend exit successfully if the flag -DXTHREAD is removed.

Xorg compiled fine with kernel 2.6.9 and now crash with 2.6.11 and 2.6.13.

--
depending in lib/Xau...
make[3]: Entering directory `/tmp/work/xc/lib/Xau'
../../config/makedepend/makedepend -I/usr/include/linux
-I/usr/comps/lib/gcc-lib/i586-linux-gnu/3.3.1/include -I/usr/www-db/include
-I/usr/mlibs/include/freetype2 -I/@--> usr/mlibs/include --   -I../..
-I../../exports/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L         
      -D_POSIX_SOURCE -D_XOPEN_SOURCE             @-->    -D_BSD_SOURCE
-D_SVID_SOURCE                 -D_GNU_SOURCE                -DFUNCPROTO=15
-DNARROWPROTO -DXTHREADS  -D_REENTRANT -DXUSE_MTSAFE_API      -DUSE_M@-->
AKEDEPEND -- AuDispose.c AuFileName.c AuGetAddr.c AuGetBest.c AuLock.c  
AuRead.c AuUnlock.c AuWrite.c
../../config/makedepend/makedepend: warning:  /usr/include/gnu/stubs.h: 
non-portable whitespace encountered at line 7
make[3]: *** [depend] Floating point exception
make[3]: Leaving directory `/tmp/work/xc/lib/Xau'
make[2]: *** [depend] Error 2
make[2]: Leaving directory `/tmp/work/xc/lib'
make[1]: *** [depend] Error 2
make[1]: Leaving directory `/tmp/work/xc'
make: *** [World] Error 2
Comment 1 Vincent 2005-09-08 15:43:13 UTC
(In reply to comment #0)

Using gccmakedepend cause warning on this files (see below)

I'll try to send a patch for makedepend.

gccmakedepend output :

../../config/util/gccmakedep -I/usr/include/linux
-I/usr/comps/lib/gcc-lib/i586-linux-gnu/3.3.1/include -I/usr/www-db/include
-I/usr/mlibs/include/freetype2 -I/usr/mlibs/include --  -I../..
-I../../exports/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L         
    -D_POSIX_SOURCE -D_XOPEN_SOURCE                 -D_BSD_SOURCE -D_SVID_SOURCE
       -D_GNU_SOURCE                -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS 
-D_REENTRANT -DXUSE_MTSAFE_API       -- AuDispose.c AuFileName.c AuGetAddr.c
AuGetBest.c AuLock.c  AuRead.c AuUnlock.c AuWrite.c
In file included from /usr/include/linux/sched.h:12,
                 from /usr/include/pthread.h:20,
                 from ../../exports/include/X11/Xthreads.h:230,
                 from AuGetBest.c:33:
/usr/include/linux/jiffies.h:385:41: division by zero in #if
/usr/include/linux/jiffies.h:385:42: division by zero in #if
/usr/include/linux/jiffies.h:396:18: division by zero in #if
/usr/include/linux/jiffies.h:416:41: division by zero in #if
/usr/include/linux/jiffies.h:416:42: division by zero in #if
/usr/include/linux/jiffies.h:432:28: division by zero in #if
Comment 2 Vincent 2005-09-08 16:32:19 UTC
Created attachment 3204 [details] [review]
First patch (just checking for division by zero)

First patch for ifparser division by 0.
Comment 3 Adam Jackson 2005-11-30 17:19:19 UTC
Comment on attachment 3204 [details] [review]
First patch (just checking for division by zero)

nominating for 7
Comment 4 Adam Jackson 2005-12-10 03:40:00 UTC
Comment on attachment 3204 [details] [review]
First patch (just checking for division by zero)

approved, i'll check this in.
Comment 5 Adam Jackson 2005-12-10 05:23:57 UTC
applied, thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.