Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113071 - gcc-3.3.6: standard library segfaults when using a huge std::vector<bool>
Summary: gcc-3.3.6: standard library segfaults when using a huge std::vector<bool>
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-20 04:31 UTC by mrsteven
Modified: 2005-12-03 02:41 UTC (History)
0 users

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


Attachments
The code that causes std::vector<bool> to crash (bitvec.cpp,367 bytes, text/plain)
2005-11-20 04:33 UTC, mrsteven
Details
Core dump of the crash (core,188.00 KB, application/octet-stream)
2005-11-20 04:35 UTC, mrsteven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mrsteven 2005-11-20 04:31:37 UTC
The attached code segfaults when compiled with gcc-3.3.6 

Reproducible: Always
Steps to Reproduce:
1. Compile the attached code with "g++ -Wall -g bitvec.cpp -o bitvec" 
2. run "./bitvec" 
 
Actual Results:  
The code segfaults although it is correct. 

Expected Results:  
It should terminate normally. 

# emerge --info 
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 
2.6.14.2 i686) 
================================================================= 
System uname: 2.6.14.2 i686 Intel(R) Pentium(R) M processor 1400MHz 
Gentoo Base System version 1.6.13 
dev-lang/python:     2.4.2 
sys-apps/sandbox:    1.2.12 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 
sys-devel/binutils:  2.15.92.0.2-r10 
sys-devel/libtool:   1.5.20 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-march=pentium3 -O2 -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=pentium3 -O2 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ 
http://mirror.switch.ch/mirror/gentoo/ 
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ 
http://ftp.du.se/pub/os/gentoo http://gentoo.mirror.solnet.ch" 
LANG="de_DE@euro" 
LINGUAS="de" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="x86 X acpi alsa apache2 arts audiofile avi berkdb bitmap-fonts bzip2 cddb 
cdparanoia cdr crypt cups curl dvd emacs emboss encode esd ethereal exif expat 
fam ffmpeg firefox flac fortran gd gdbm gif gimpprint glut gphoto2 gtk gtk2 
idn imagemagick imlib java javascript jpeg kde kdeenablefinal lcms libg++ 
libwww live logrotate lua mad mikmod mng motif mp3 mpeg mule ncurses network 
nls no_wxgtk1 nptl ogg oggvorbis openal opengl pam pcmcia pcre pdflib perl png 
pnp povray python qt quicktime readline real recode samba sdl spell sse sse2 
ssl tcpd tiff truetype truetype-fonts type1-fonts udev usb vorbis wmf xine 
xml2 xmms xv xvid zlib linguas_de userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS
Comment 1 mrsteven 2005-11-20 04:33:52 UTC
Created attachment 73219 [details]
The code that causes std::vector<bool> to crash
Comment 2 mrsteven 2005-11-20 04:35:16 UTC
Created attachment 73220 [details]
Core dump of the crash
Comment 3 SpanKY gentoo-dev 2005-11-20 04:50:43 UTC
test gcc-3.4.4 and see if that works please
Comment 4 mrsteven 2005-11-22 08:43:09 UTC
Yes, it works fine with vanilla gcc-3.4.4. I tested that with a local version 
in $HOME/usr. I think it should also work with gentoo's gcc. 
Comment 5 SpanKY gentoo-dev 2005-11-22 08:47:18 UTC
i didnt ask about vanilla gcc, i asked about Gentoo's 3.4.4-r1
Comment 6 mrsteven 2005-12-03 02:41:37 UTC
Yes, it works, so I regard this as fixed.