Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412155 - dev-libs/boost-1.49.0: handling of destructors in intrusive_base.hpp
Summary: dev-libs/boost-1.49.0: handling of destructors in intrusive_base.hpp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: C++ Team [disbanded]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 00:13 UTC by Markus Peloquin
Modified: 2012-07-07 22:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
boost-1.49.0-gcc462-intrusive_ptr.patch (boost-1.49.0-gcc462-intrusive_ptr.patch,595 bytes, text/plain)
2012-04-16 00:13 UTC, Markus Peloquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Peloquin 2012-04-16 00:13:00 UTC
Created attachment 309101 [details]
boost-1.49.0-gcc462-intrusive_ptr.patch

I was told to clone bug 411691 'for the Boost people'. My build.log and preprocessed source is there, and I sent the issue upstream. Boost's response is that their code is correct, but they will factor out the intrusive_base class in the future since it seems unnecessary. Information from bug 411691 indicates this is probably only a problem with gcc-4.6.2 and not -4.6.3 (I'm not sure about <gcc-4.6.2). I'm attaching my patch that gets the build to complete successfully.


gcc.compile.c++ ../bin.v2/tools/quickbook/src/gcc-4.6/release/link-static/pch-off/id_manager.o

    "x86_64-pc-linux-gnu-g++"  -ftemplate-depth-300 -O2 -pipe -march=amdfam10 -O3 -finline-functions -Wno-inline -Wall -g0 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG  -I".." -c -o "../bin.v2/tools/quickbook/src/gcc-4.6/release/link-static/pch-off/id_manager.o" "quickbook/src/id_manager.cpp"

In file included from ../boost/intrusive_ptr.hpp:16:0,
                 from quickbook/src/fwd.hpp:15,
                 from quickbook/src/values.hpp:20,
                 from quickbook/src/id_manager.hpp:14,
                 from quickbook/src/id_manager.cpp:9:
../boost/smart_ptr/intrusive_ptr.hpp: In destructor ‘boost::intrusive_ptr<T>::~intrusive_ptr() [with T = quickbook::file_info]’:
../boost/smart_ptr/intrusive_ptr.hpp:94:5: internal compiler error: Segmentation fault


Portage 2.2.0_alpha100 (default/linux/amd64/10.0/desktop, gcc-4.6.2, glibc-2.13-r4, 3.3.0-gentoo x86_64)
=================================================================
System uname: Linux-3.3.0-gentoo-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.1
Timestamp of tree: Thu, 12 Apr 2012 04:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2-r1
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo perl-experimental enlightenment galadriel
Installed sets: @enlightenment-live, @enlightenment-modules
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10 AdobeFlash-10.1 PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=amdfam10"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=amdfam10"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync xattr"
FFLAGS=""
GENTOO_MIRRORS=" http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de de_DE en en_US nb nb_NO no"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/perl-experimental /var/lib/layman/enlightenment /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aalib acl acpi afs alsa amd64 arts bash-completion berkdb branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cvs cxx dbus dga directfb dri dts dvd dvdr eds emboss encode exif expat fam fbcon ffmpeg firefox flac fontconfig fortran ftp gcj gd gdu geoip ggi gif gpm gstreamer gtk iconv icu imagemagick imap ipod ipv6 java jpeg jpeg2k kde kerberos ladspa lame lapack latex lcms ldap libedit libnotify lzma lzo mad maildir mbox mms mmx mng modules motroska mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musepack musicbrainz nas ncurses networkmanager nls nntp nptl nptlonly offensive ogg openal openexr opengl openmp pam pango pcre pdf perl plotutils png policykit portaudio postgres ppds pppd python qt3support qt4 quicktime readline samba sasl sdl semantic-desktop session smp speex spell sse sse2 ssl startup-notification static-libs subversion svg sysfs syslog taglib tcpd theora threads tiff truetype udev unicode usb vim-syntax vorbis wavpack wifi wmf wxwidgets x264 xattr xcb xcomposite xft xine xinetd xml xorg xosd xpm xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard joystick mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de de_DE en en_US nb nb_NO no" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx r700 radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Markus Peloquin 2012-04-16 00:17:43 UTC
Oh right, the upstream bug is https://svn.boost.org/trac/boost/ticket/6794

The Boost developer seems to think gcc's issue is that a subclass of intrusive_base declares it's destructor virtual, which is fine as long as you never try to delete an intrusive_base pointer or make some smart pointer like auto_ptr<intrusive_base>.
Comment 2 SpanKY gentoo-dev 2012-04-16 14:47:08 UTC
this bug is only about the issue:

ALWAYS make destructors virtual, unless you really don't like OOP. So it's both a Boost bug and a GCC bug. I am so proud of myself right now :) Enough excitement for me, I need to get about six hours of sleep now.

the gcc crash is bug 411691
Comment 3 Arfrever Frehtes Taifersar Arahesis 2012-07-07 20:08:08 UTC
Boost 1.50.0 includes the fix.