Bug 175669

Summary: gnome canvas segfaults when built with gcc 4.1
Product: [Fedora] Fedora Reporter: Jeremy Katz <katzj>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: brgerst, jakub, mlists, notting, sangu.fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.1.0-0.9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-16 11:34:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 175588    
Bug Blocks:    

Description Jeremy Katz 2005-12-13 20:18:45 UTC
libgnomecanvas is segfaulting when built with gcc 4.1.  Reproducible with the
demos in the source or something like the following:
  #!/usr/bin/python

  import gtk, gnomecanvas

  w = gtk.Window()
  c = gnomecanvas.Canvas()
  root = c.root()
  root.add(gnomecanvas.CanvasText, text='xxxxx', fill_color='red') 
  w.add(c)
  w.show_all() 
  gtk.main()


Backtrace is 
#0  0x00966ab0 in uta_union_clip (uta1=0x9e0ff48, uta2=0x0, clip=Variable "clip"
is not available.
)
    at gnome-canvas.c:3593
#1  0x0096c3bb in gnome_canvas_request_redraw_uta (canvas=0x9dd2520,
    uta=0x9e0ff48) at gnome-canvas.c:3698
#2  0x0096c59c in gnome_canvas_request_redraw (canvas=0x9dd2520, x1=-15,
    y1=-7, x2=15, y2=8) at gnome-canvas.c:3745
#3  0x00964bc9 in gnome_canvas_update_bbox (item=0x9dd7510, x1=-15, y1=-7,
    x2=15, y2=8) at gnome-canvas-util.c:618
#4  0x0095f6d2 in gnome_canvas_text_update (item=0x9dd7510, affine=0xbfb9bd78,
    clip_path=0x0, flags=3) at gnome-canvas-text.c:1411
#5  0x00966f6c in gnome_canvas_item_invoke_update (item=0x9dd7510,
    p2cpx=0x9dd7510, clip_path=0x0, flags=3) at gnome-canvas.c:474
#6  0x0096afb2 in gnome_canvas_group_update (item=0x9dd3570,
    affine=0xbfb9be58, clip_path=0x0, flags=3) at gnome-canvas.c:1572
#7  0x00966f6c in gnome_canvas_item_invoke_update (item=0x9dd3570,
    p2cpx=0x9dd3570, clip_path=0x0, flags=0) at gnome-canvas.c:474
#8  0x00967e00 in do_update (canvas=0x9dd2520) at gnome-canvas.c:3163
#9  0x00968c79 in idle_handler (data=0x9dd2520) at gnome-canvas.c:3199
#10 0x0060813e in g_list_remove_link () from /usr/lib/libglib-2.0.so.0
#11 0x00609943 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#12 0x0060c893 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#13 0x0060cc3c in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#14 0x003acd3c in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#15 0x001dcd48 in init_gtk ()
   from /usr/lib/python2.4/site-packages/gtk-2.0/gtk/_gtk.so
#16 0x00d9f597 in PyEval_EvalFrame () from /usr/lib/libpython2.4.so.1.0
#17 0x00da0f3a in PyEval_EvalCodeEx () from /usr/lib/libpython2.4.so.1.0
#18 0x00da10ad in PyEval_EvalCode () from /usr/lib/libpython2.4.so.1.0
#19 0x00dbd9da in PyErr_Display () from /usr/lib/libpython2.4.so.1.0
#20 0x00dbecd2 in PyRun_SimpleFileExFlags () from /usr/lib/libpython2.4.so.1.0
#21 0x00dbf759 in PyRun_AnyFileExFlags () from /usr/lib/libpython2.4.so.1.0
#22 0x00dc5724 in Py_Main () from /usr/lib/libpython2.4.so.1.0
#23 0x0804859a in main ()

Compiling gnome-canvas.o with -O0 or -O1 instead lets things work.

Comment 1 sangu 2005-12-14 02:21:41 UTC
*** Bug 175689 has been marked as a duplicate of this bug. ***

Comment 2 Jakub Jelinek 2005-12-14 12:43:51 UTC
Does it fail on all arches or just i386 (judging from #175689, this bug
doesn't have arch filled)?
Does different -mtune= setting (say -mtune=i686 rather than -mtune=pentium4)
help?


Comment 3 Jakub Jelinek 2005-12-14 14:55:46 UTC
I have googled around and found PR24899, guess that's it.
Can anyone verify that -fno-strength-reduce makes the problem go away?
If so, I'll see what I can do.

Comment 4 Jeremy Katz 2005-12-14 15:41:20 UTC
-fno-strength-reduce does fix it.   And it happens on at least x86_64 as well

And I thought I attached the .i files here last night before I went home but
they're not here... bleah, sorry about that.

Comment 5 Bill Nottingham 2005-12-14 19:26:35 UTC
*** Bug 175588 has been marked as a duplicate of this bug. ***

Comment 6 Jakub Jelinek 2005-12-16 11:34:53 UTC
Should be fixed in gcc-4.1.0-0.9.