After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758028 - Glib bug when compile gobject.o with any optimization (-Os -O1 or -O2)
Glib bug when compile gobject.o with any optimization (-Os -O1 or -O2)
Status: RESOLVED INCOMPLETE
Product: glib
Classification: Platform
Component: build
2.42.x
Other Linux
: High critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-11-12 19:48 UTC by Toan
Modified: 2017-11-15 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Toan 2015-11-12 19:48:57 UTC
Hi all,


If i were to compile glib with any kind of CFLAG optimization like -Os -O1 or -O2, when I run any kind of gtk applications like gtk-demo the application would crash and would output this message in the console log:

-------------------------------------------------------
root@vanilla:~# gtk-demo

(gtk-demo:28852): Gdk-WARNING **: losing last reference to u


(gtk-demo:28852): Gdk-CRITICAL **: _gdk_x11_window_get_tople                                    w)' failed
Segmentation fault
root@vanilla:~# gtk-demo

(gtk-demo:28854): Gdk-WARNING **: losing last reference to u


(gtk-demo:28854): Gdk-CRITICAL **: _gdk_x11_window_get_tople                                    w)' failed
Segmentation fault
---------------------------------------------------------


And if I were to go back and manually compile the source file at gobject/gobject.c without optimization, the bug would go away.  

I would like to know if anyone had this problem before?  So far, I've tested this bug with gcc-4.5.1 and glib-2.32.x and glib-2.42.4.

Please share if you know anything about this bug, which could very well be a compiler bug not a glib bug.  thank you.
Comment 1 Philip Withnall 2017-11-15 12:40:23 UTC
I’ve never come across this bug before, and can’t diagnose it without a full backtrace with debug symbols. Please see https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for more information on how to get one.

Since this is a fairly old bug, I’m going to close it for now. If you can still reproduce it, and can provide a backtrace, please re-open the bug. Thanks.