Bug 16449 - GTK segv when compiled with -O2 (default)
Summary: GTK segv when compiled with -O2 (default)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gtk+
Version: 7.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-17 14:06 UTC by Alan Shutko
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-08-17 14:45:36 UTC
Embargoed:


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

Description Alan Shutko 2000-08-17 14:06:36 UTC
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
".cvsignore")
    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 14:07:30 UTC
Created attachment 2588 [details]
Test program to show crash

Comment 2 Alan Shutko 2000-08-17 14:25:01 UTC
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 14:45:31 UTC
Recompiling all of gtk with gcc 2.96-52 still yield the crash.

Comment 4 Jakub Jelinek 2000-08-18 16:33:36 UTC
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.