Bug 65290

Summary: SEGFAULT when #defining and #undef'ing a function
Product: [Applications] kdevelop Reporter: Graham Dennis <u3952328>
Component: Language Support: CPP (old)Assignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED NOT A BUG    
Severity: crash    
Priority: NOR    
Version: 3.0.0a7   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Graham Dennis 2003-10-01 04:27:17 UTC
Version:           3.0.0a7 (using KDE 3.1.9)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
OS:          Linux (i686) release 2.4.22-ck2

Steps to reproduce:
insert the code into the file
#define GMT1_1_2001       978307200
#define UNIX2OSX(x)   ((x)-GMT1_1_2001)

#undef GMT1_1_2001
#undef UNIX2OSX

Now begin to type UNIX2OSX( ... on the opening parenthesis it SEGFAULTS
This bug is always reproducible. Gideon was built using KDE3.2alpha2 but I found the same problem with KDE3.1.4 and a previous release of gideon.
Comment 1 Graham Dennis 2003-10-01 04:28:57 UTC
Forgot to mention: 
Workaround: Comment out the #undef 
Comment 2 Amilcar do Carmo Lucas 2003-10-03 19:13:06 UTC
A backtrace would be nice!!! 
Comment 3 Graham Dennis 2003-10-05 10:58:52 UTC
I rebuilt it with debugging enabled, but the backtrace isn't that large... (but larger than 
before) perhaps I've done something wrong. But this bug is reproducible for any #define 
#undefined function... Not just the one mentioned in my initial report. 
 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...[New Thread 16384 (LWP 30584)] 
[New Thread 32769 (LWP 30592)] 
[New Thread 16386 (LWP 30593)] 
0x4fd7e39c in waitpid () 
   from /lib/libpthread.so.0 
#0  0x4fd7e39c in waitpid () from /lib/libpthread.so.0 
#1  0x40c35c9b in KCrash::defaultCrashHandler(int) () 
   from /usr/kde/3.2/lib/libkdecore.so.4 
#2  <signal handler called> 
#3  0x08071ac4 in QShared::ref() () 
#4  0x416772c2 in QValueList<QString>::QValueList(QValueList<QString> const&) 
    () from /usr/lib/kde3/libkdevcppsupport.so 
#5  0x424a8b94 in __JCR_LIST__ () from /usr/qt/3/lib/libqt-mt.so.3 
 
Comment 4 Roberto Raggi 2003-11-04 16:20:56 UTC
sorry, but we can't reproduce it, maybe it is a bug of your distribution