Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc-4.5.3-r1 emerge fails with "malloc(): memory corruption"
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message

Joined: 10 Aug 2003
Posts: 51

PostPosted: Sat Oct 01, 2011 6:55 pm    Post subject: gcc-4.5.3-r1 emerge fails with "malloc(): memory corrup Reply with quote

I'm having trouble emerging gcc-4.5.3-r1 on an old Pentium that I'm trying to install Gentoo on. I'm emerging gcc as one of the steps of changing my CHOST (from i486 to i586), and run into the following error:


echo SHLIB_EXT = '.so' >> tmp-libgcc.mvars
echo SHLIB_MKMAP = '$(gcc_srcdir)/mkmap-symver.awk ' >> tmp-libgcc.mvars
echo SHLIB_MKMAP_OPTS = '' >> tmp-libgcc.mvars
echo SHLIB_MAPFILES = '$(gcc_srcdir)/libgcc-std.ver $(gcc_srcdir)/config/i386/libgcc-glibc.ver ' >> tmp-libgcc.mvars
echo SHLIB_NM_FLAGS = '-pg' >> tmp-libgcc.mvars
echo LIBGCC2_CFLAGS = '-O2  -g -O2 -march=pentium -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  ' >> tmp-libgcc.mvars
echo TARGET_LIBGCC2_CFLAGS = '-fPIC' >> tmp-libgcc.mvars
echo LIBGCC_SYNC = '' >> tmp-libgcc.mvars
echo LIBGCC_SYNC_CFLAGS = '' >> tmp-libgcc.mvars
echo CRTSTUFF_CFLAGS = '-O2 -g -O2 -march=pentium -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc -I/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/../libcpp/include  -I/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/../libdecnumber/bid -I../libdecnumber     -g0 -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize  ' >> tmp-libgcc.mvars
echo CRTSTUFF_T_CFLAGS = ' -fno-omit-frame-pointer -fno-asynchronous-unwind-tables ' >> tmp-libgcc.mvars
echo CRTSTUFF_T_CFLAGS_S = ' -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fPIC' >> tmp-libgcc.mvars
echo TARGET_SYSTEM_ROOT = '' >> tmp-libgcc.mvars
echo enable_crtbeginTS = '' >> tmp-libgcc.mvars
mv tmp-libgcc.mvars libgcc.mvars
*** glibc detected *** /usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1: malloc(): memory corruption: 0x0959aee8 ***
======= Backtrace: =========
======= Memory map: ========
00110000-0015c000 r-xp 00000000 08:04 136955     /usr/lib/
0015c000-0015d000 r--p 0004c000 08:04 136955     /usr/lib/
0015d000-0015e000 rw-p 0004d000 08:04 136955     /usr/lib/
0015e000-0017a000 r-xp 00000000 08:04 134761     /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/
0017a000-0017b000 r--p 0001b000 08:04 134761     /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/
0017b000-0017c000 rw-p 0001c000 08:04 134761     /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/
001a3000-001a5000 r-xp 00000000 08:04 426        /lib/
001a5000-001a6000 r--p 00001000 08:04 426        /lib/
001a6000-001a7000 rw-p 00002000 08:04 426        /lib/
001a7000-002ec000 r-xp 00000000 08:04 146        /lib/
002ec000-002ed000 ---p 00145000 08:04 146        /lib/
002ed000-002ef000 r--p 00145000 08:04 146        /lib/
002ef000-002f0000 rw-p 00147000 08:04 146        /lib/
002f0000-002f3000 rw-p 00000000 00:00 0
0032b000-0032c000 r-xp 00000000 00:00 0          [vdso]
0082f000-00843000 r-xp 00000000 08:04 379        /lib/
00843000-00844000 r--p 00013000 08:04 379        /lib/
00844000-00845000 rw-p 00014000 08:04 379        /lib/
008bf000-00913000 r-xp 00000000 08:04 139447     /usr/lib/
00913000-00914000 r--p 00053000 08:04 139447     /usr/lib/
00914000-0091b000 rw-p 00054000 08:04 139447     /usr/lib/
00a12000-00a23000 r-xp 00000000 08:04 136933     /usr/lib/
00a23000-00a24000 r--p 00010000 08:04 136933     /usr/lib/
00a24000-00a25000 rw-p 00011000 08:04 136933     /usr/lib/
00b87000-00b96000 r-xp 00000000 08:04 136944     /usr/lib/
00b96000-00b97000 r--p 0000e000 08:04 136944     /usr/lib/
00b97000-00b98000 rw-p 0000f000 08:04 136944     /usr/lib/
00b98000-00b9a000 rw-p 00000000 00:00 0
00ee3000-00efe000 r-xp 00000000 08:04 429        /lib/
00efe000-00eff000 r--p 0001b000 08:04 429        /lib/
00eff000-00f00000 rw-p 0001c000 08:04 429        /lib/
08048000-08852000 r-xp 00000000 08:04 145206     /usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1
08853000-08854000 r--p 0080a000 08:04 145206     /usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1
08854000-088e6000 rw-p 0080b000 08:04 145206     /usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1
088e6000-08958000 rw-p 00000000 00:00 0
089a0000-0e5fb000 rw-p 00000000 00:00 0          [heap]
b2500000-b2521000 rw-p 00000000 00:00 0
b2521000-b2600000 ---p 00000000 00:00 0
b26be000-b371c000 rw-p 00000000 00:00 0
b373e000-b41a9000 rw-p 00000000 00:00 0
b41ac000-b4801000 rw-p 00000000 00:00 0
b4810000-b5d08000 rw-p 00000000 00:00 0
b5d0a000-b617c000 rw-p 00000000 00:00 0
b617e000-b6cee000 rw-p 00000000 00:00 0
b6cef000-b6f43000 rw-p 00000000 00:00 0
b6f45000-b745b000 rw-p 00000000 00:00 0
b745c000-b76da000 rw-p 00000000 00:00 0
b76da000-b78ca000 r--p 00000000 08:04 203632     /usr/lib/locale/locale-archive
b78ca000-b78cd000 rw-p 00000000 00:00 0
b78cd000-b78d0000 rw-p 00000000 00:00 0
bf8df000-bf929000 rw-p 00000000 00:00 0          [stack]
/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/config/i386/ In function âinternal_dfa_insn_codeâ:
/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/config/i386/ internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <> for instructions.
make[3]: *** [insn-attrtab.o] Error 1
rm gcc.pod
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
 * ERROR: sys-devel/gcc-4.5.3-r1 failed (compile phase):
 *   emake failed with bootstrap-lean
 * Call stack:
 *, line   56:  Called src_compile
 *   environment, line 4597:  Called toolchain_src_compile
 *   environment, line 5293:  Called gcc_do_make
 *   environment, line 2712:  Called die
 * The specific snippet of code:
 * If you need support, post the output of 'emerge --info =sys-devel/gcc-4.5.3-r1',
 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-4.5.3-r1'.
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.5.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.5.3-r1/temp/environment'.
 * S: '/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/build'

>>> Failed to emerge sys-devel/gcc-4.5.3-r1, Log file:

>>>  '/var/tmp/portage/sys-devel/gcc-4.5.3-r1/temp/build.log'

Output of emerge --info is as follows:

Portage (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.12.2-r0, 2.6.35-std211-i586 i586)
System uname: Linux-2.6.35-std211-i586-i586-Pentium_75_-_200-with-gentoo-2.0.3
Timestamp of tree: Fri, 30 Sep 2011 21:30:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1"
CFLAGS="-O2 -march=pentium -fomit-frame-pointer -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=pentium -fomit-frame-pointer -pipe"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en nl"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdda cli consolekit cracklib crypt cups cxx dbus dri dts dvd emboss encode exif fam firefox flac fortran gdbm gdu gif gpm iconv ipv6 jpeg lcms ldap libnotify lxde mad mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vim-syntax vorbis x264 x86 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en nl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa rendition" 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"

All help is greatly appreciated.
Back to top
View user's profile Send private message

Joined: 06 Mar 2007
Posts: 14745

PostPosted: Sat Oct 01, 2011 11:23 pm    Post subject: Reply with quote

If you retry the build, does it fail in the same spot and with the same message? If yes, then this is probably a software issue. If no, then you may have faulty hardware.
Back to top
View user's profile Send private message

Joined: 10 Aug 2003
Posts: 51

PostPosted: Sun Oct 02, 2011 12:42 am    Post subject: Reply with quote

That is the answer I both expected and didn't hope to get. I'm doing the emerge again now (on the system in question it takes a while and a half), I will let you know how that pans out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum