Bug 11118 - CairoWidget.cxx doesn't compile with gcc 4.4.2 on 32bit
Summary: CairoWidget.cxx doesn't compile with gcc 4.4.2 on 32bit
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Tim Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-30 18:42 UTC by Mark Wielaard
Modified: 2009-12-31 11:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2009-12-30 18:42:07 UTC
The gcc on Fedora 12, i386, fails to compile CairoWidget.cxx:

g++ -DHAVE_CONFIG_H -I. -I/home/mark/src/systemtap/grapher -I.. 
-DPKGDATADIR='"/home/mark/install/systemtap/share/systemtap"' 
-I/usr/include/libglademm-2.4 -I/usr/lib/libglademm-2.4/include
-I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include
-I/usr/include/libglade-2.0 -I/usr/include/giomm-2.4
-I/usr/lib/giomm-2.4/include -I/usr/include/pangomm-1.4
-I/usr/lib/pangomm-1.4/include -I/usr/include/gtk-2.0
-I/usr/include/gtk-unix-print-2.0 -I/usr/include/atkmm-1.6
-I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/glibmm-2.4
-I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include -I/usr/include/cairomm-1.0
-I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/libxml2 -O2 -Wall -Werror -g -Werror
-fstack-protector-all -D_FORTIFY_SOURCE=2 -MT stapgraph-CairoWidget.o -MD -MP
-MF .deps/stapgraph-CairoWidget.Tpo -c -o stapgraph-CairoWidget.o `test -f
'CairoWidget.cxx' || echo '/home/mark/src/systemtap/grapher/'`CairoWidget.cxx
cc1plus: warnings being treated as errors
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/bits/stl_algo.h:
In member function ‘virtual void
systemtap::CairoTextBox::draw(Cairo::RefPtr<Cairo::Context>)’:
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/bits/stl_algo.h:2178:
error: array subscript is above array bounds

gcc-4.4.2-20.fc12.i686

The error message looks somewhat obscure.
It compiles fine on x86_64.
It also compiles without -O2, or with -O3.
So this might be a gcc bug.

P.S. There should be a grapher component in systemtap bugzilla.
Comment 1 Tim Moore 2009-12-31 11:17:40 UTC
In 72f28cc2cb57bb I changed the use of is_any_of to is_from_range and this now
compiles on i386. The Net consensus is that this is a gcc bug.