Bug 16449 - GTK segv when compiled with -O2 (default)
GTK segv when compiled with -O2 (default)
Product: Red Hat Linux
Classification: Retired
Component: gtk+ (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2000-08-17 10:06 EDT by Alan Shutko
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-17 10:45:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test program to show crash (3.42 KB, text/plain)
2000-08-17 10:07 EDT, Alan Shutko
no flags Details

  None (edit)
Description Alan Shutko 2000-08-17 10:06:36 EDT
Running the attached program gives a segv as below

#0  0x158 in ?? ()
#1  0x40052d51 in real_insert_row (clist=0x8074e88, row=0, text=0xbffff398)
    at gtkclist.c:2699
#2  0x400529a8 in gtk_clist_append (clist=0x8074e88, text=0xbffff398)
    at gtkclist.c:2584
#3  0x8049049 in list_add_file (clist=0x8074e88, file=0x8079ef0
    at gtktest.c:26
#4  0x80491b8 in list_update (clist=0x8074e88) at gtktest.c:60
#5  0x80494f1 in main (argc=2, argv=0xbffff4e4) at gtktest.c:104
#6  0x402e8345 in __libc_start_main (main=0x804922c <main>, argc=2, 
    ubp_av=0xbffff4e4, init=0x8048c44 <_init>, fini=0x804953c <_fini>, 
    rtld_fini=0x4000de14 <_dl_fini>, stack_end=0xbffff4dc)
    at ../sysdeps/generic/libc-start.c:111

(Frame zero is actually the clist sync_selection, called through a pointer
which has been set to NULL.)

Recompiling gtk (1.2.8 source) from source with configure defaults also
shows this error.  Recompiling gtkclist.c with -O instead of -O2 and
rebuilding libgtk fixes this problem.

Testing method:
Build gtktest using the compile-command at the end of the file, building
against pinstripe gtk.
./gtktest -> crash
Build gtk from source with plain ./configure
LD_LIBRARY_PATH=/home/ats/gtk-1.2.8/gtk/.libs ./gtktest ->crash
vi /home/ats/gtk-1.2.8/gtk/Makefile, s/-O2/-O/, touch gtkclist.c, make
LD_LIBRARY_PATH=/home/ats/gtk-1.2.8/gtk/.libs ./gtktest ->work

(I seem to recall that I can attach a file after committing the bug, so
I'll try that.)
Comment 1 Alan Shutko 2000-08-17 10:07:30 EDT
Created attachment 2588 [details]
Test program to show crash
Comment 2 Alan Shutko 2000-08-17 10:25:01 EDT
Tested recompiling gtkclist.c with gcc from rawhide (2.96-52) and it didn't cure
the problem.  Now recompiling all of gtk with it.  Will report when completed.
Comment 3 Alan Shutko 2000-08-17 10:45:31 EDT
Recompiling all of gtk with gcc 2.96-52 still yield the crash.
Comment 4 Jakub Jelinek 2000-08-18 12:33:36 EDT
Buggy gtkclist, fixed in gtk+-1.2.8-7

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