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
rbergen
n00b
n00b


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:

Code:

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: =========
/lib/libc.so.6(+0x6dbaa)[0x214baa]
/lib/libc.so.6(+0x70451)[0x217451]
/lib/libc.so.6(__libc_malloc+0x57)[0x2194e7]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(xmalloc+0x25)[0x871ae75]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1[0x818a483]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1[0x818a5c6]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(df_insn_rescan+0x286)[0x818dff6]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(df_update_entry_exit_and_calls+0x71)[0x818f4c1]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(df_process_deferred_rescans+0x3af)[0x818f89f]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(df_finish_pass+0x9a)[0x817e51a]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1[0x825053a]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(execute_one_pass+0xeb)[0x829dc1b]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(execute_pass_list+0x1e)[0x829dece]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(execute_pass_list+0x35)[0x829dee5]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(tree_rest_of_compilation+0x82)[0x8365722]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1[0x8485396]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(cgraph_optimize+0x6cb)[0x84875cb]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(cgraph_finalize_compilation_unit+0xef)[0x848775f]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(c_write_global_declarations+0xc4)[0x80d6e54]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(toplev_main+0xe8b)[0x832b68b]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1(main+0x1d)[0x8126e3d]
/lib/libc.so.6(__libc_start_main+0xdb)[0x1c10fb]
/usr/libexec/gcc/i486-pc-linux-gnu/4.5.3/cc1[0x80c34d1]
======= Memory map: ========
00110000-0015c000 r-xp 00000000 08:04 136955     /usr/lib/libmpfr.so.4.0.1
0015c000-0015d000 r--p 0004c000 08:04 136955     /usr/lib/libmpfr.so.4.0.1
0015d000-0015e000 rw-p 0004d000 08:04 136955     /usr/lib/libmpfr.so.4.0.1
0015e000-0017a000 r-xp 00000000 08:04 134761     /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/libgcc_s.so.1
0017a000-0017b000 r--p 0001b000 08:04 134761     /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/libgcc_s.so.1
0017b000-0017c000 rw-p 0001c000 08:04 134761     /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/libgcc_s.so.1
001a3000-001a5000 r-xp 00000000 08:04 426        /lib/libdl-2.12.2.so
001a5000-001a6000 r--p 00001000 08:04 426        /lib/libdl-2.12.2.so
001a6000-001a7000 rw-p 00002000 08:04 426        /lib/libdl-2.12.2.so
001a7000-002ec000 r-xp 00000000 08:04 146        /lib/libc-2.12.2.so
002ec000-002ed000 ---p 00145000 08:04 146        /lib/libc-2.12.2.so
002ed000-002ef000 r--p 00145000 08:04 146        /lib/libc-2.12.2.so
002ef000-002f0000 rw-p 00147000 08:04 146        /lib/libc-2.12.2.so
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/libz.so.1.2.5
00843000-00844000 r--p 00013000 08:04 379        /lib/libz.so.1.2.5
00844000-00845000 rw-p 00014000 08:04 379        /lib/libz.so.1.2.5
008bf000-00913000 r-xp 00000000 08:04 139447     /usr/lib/libgmp.so.10.0.2
00913000-00914000 r--p 00053000 08:04 139447     /usr/lib/libgmp.so.10.0.2
00914000-0091b000 rw-p 00054000 08:04 139447     /usr/lib/libgmp.so.10.0.2
00a12000-00a23000 r-xp 00000000 08:04 136933     /usr/lib/libmpc.so.2.0.0
00a23000-00a24000 r--p 00010000 08:04 136933     /usr/lib/libmpc.so.2.0.0
00a24000-00a25000 rw-p 00011000 08:04 136933     /usr/lib/libmpc.so.2.0.0
00b87000-00b96000 r-xp 00000000 08:04 136944     /usr/lib/libsandbox.so
00b96000-00b97000 r--p 0000e000 08:04 136944     /usr/lib/libsandbox.so
00b97000-00b98000 rw-p 0000f000 08:04 136944     /usr/lib/libsandbox.so
00b98000-00b9a000 rw-p 00000000 00:00 0
00ee3000-00efe000 r-xp 00000000 08:04 429        /lib/ld-2.12.2.so
00efe000-00eff000 r--p 0001b000 08:04 429        /lib/ld-2.12.2.so
00eff000-00f00000 rw-p 0001c000 08:04 429        /lib/ld-2.12.2.so
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/i386.md: In function âinternal_dfa_insn_codeâ:
/var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/gcc/config/i386/i386.md:360:1: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> 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:
 *     ebuild.sh, 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:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 *
 * 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:
Code:

Portage 2.1.10.11 (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: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-O2 -march=pentium -fomit-frame-pointer -pipe"
CHOST="i586-pc-linux-gnu"
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"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
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"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.leaseweb.com/gentoo/ http://gentoo.tiscali.nl/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en nl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
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"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


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


Joined: 06 Mar 2007
Posts: 21605

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
rbergen
n00b
n00b


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