# false memtest86 errors? (when built with gcc-4.3.1)

## jimhend~1

hi.

i am a little confused ,

if i compile memtest86-3.4 and memtest86+2.01 with gcc-4.3.1 everything seems to compile and install fine,

and then when i run lilo and boot into memtest i get piles of ram errors.

the weird thing is , is that if i recompile the memtests with gcc-4.2 then all the errors disappear.

can anyone pls let me know if memtest86 or memtest86+ is behaving weirdly when compiled with gcc-4.3.1

thanks

 emerge --info

Portage 2.2_rc8 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1 x86_64)

=================================================================

System uname: Linux-2.6.26-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-glibc2.2.5

Timestamp of tree: Mon, 15 Sep 2008 23:45:01 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 1.3.7, 2.1.6-r1

dev-lang/python:     2.4.4-r13, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 2.0.0

sys-apps/openrc:     0.2.5

sys-apps/sandbox:    1.2.18.1-r3

sys-devel/autoconf:  2.13, 2.62-r1

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   2.2.4

virtual/os-headers:  2.6.26

ACCEPT_KEYWORDS="amd64 ~amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=nocona -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch userpriv"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

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="/dev/shm"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="   "

SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"

USE="16bit S3TC X a52 aac accessibility ace acpi acpi4linux additions afterimage aim akode alsa amarok amazon amd64 ao aoss applet archive artworkextra asf async audacious audiofile automount avahi background bash-completion bcmath berkdb bittorrent bjam blender-game bonobo browserplugin bzip2 bzlib c++ cairo calendar ccache cdaudio cdda cddb cdio cdparanoia cdr cdrom chroot cli cpudetection cracklib crypt curl cursors custom-cflags dbus de_tvtoday dga dhcp directfb divx dnd dpmod dpms dri dv dvd dvdr dvdread dvi emul-linux-x86 encode epiphany ethereal evolution examples expat extrafilters fbdev ffmpeg finger fla flac flash fmod fontconfig freetype ftp gaim gd gdbm gdm gimp git glade glib glibc-omitfp glitz glut gmedia gnome gnutls gphoto2 gpm gstreamer010 gtk gzip hal hardcoded-tables hddtemp hfs icons iconv icq id3 id3tag image imagemagick imlib2 ipod irc ivtv jack java javascript jpeg kde kdm kqemu lame lash libnotify libsamplerate libvisual lights lirc live lm_sensors logitech-mouse logrotate matroska mdnsresponder-compat memlimit midi mixer mjpeg mmap mmx mmxext modplug mods mono moznocompose moznoirc moznomail moznoroaming mp2 mp3 mp4 mp4live mpeg mpeg2 mpeg4 mplayer msn msql mudflap multilib musepack musicbrainz mysql mythtv nautilus ncurses net network networkmanager newspr nls nntp nocd nptlonly nsplugin ntfs ogg oggvorbis openal opengl openmp p2p pam pango pcntl pcre perl pmu png posix pppd pulseaudio pvr python qmax qt3 qt3support qt4 radio rar rdesktop readline realmedia reflection reiserfs rhythmbox rogue rplay rpm rtc samba sblive sdl sdl-image sdl-sound sdlaudio seamonkey session skins smp sndfile sound soundtouch source sox spl sqlite src srt sse sse2 sse3 ssh ssl ssse3 stream subversion sys-libs sysfs syslog taglib tcl tcltk tcp tcpd tcpwrapper textures theora threads threadsafe tk transcode truetype twolame unicode unzip usb v4l v4l2 vcd vfat vga videos vlm vorbis wav wavpack wma wma123 wmp wordperfect wxwindows x264 xanim xatrix xattr xchat xcomposite xext xft xine xorg xosd xpm xscreensaver xterm xulrunner xv xvid xvmc yv12 zip zlib" ALSA_CARDS="ice1712 intel8x0" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="fglrx radeon"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

----------

## eccerr0r

Is every address wrong, or they show up once in a while?  What do you mean by piles?  Any correlation from address to data?  Any specific tests it fails on?

Tried a different -O setting with gcc-4.3??

There's definitely a possibility that gcc creates incorrect code causing false positive errors, or there's also a possibility that it's generating tighter code, that could expose additional problems.   I'd suspect towards the former.  Knowing the test and nature of the errors would be good to debug (for a dev?).

----------

## redgsturbo

Dell systems have an issue with memtest

----------

## jimhend~1

on both versions of memtest test1 passes fine.

then shortly into test #2 when the test is described as ffffffffff

literally thousands of errors occur ,

memtest86-3.4 never seems to move on from the test and the screen goes weird

and i cant escape the test either except with reset button.

ill try a few of ur other sugestions soon

thanks

----------

## bbee

I can confirm this since I just ran into it.. Both memtest86 3.4 and memtest86+ 2.01 built with 4.3.1 give tens of thousands of errors on test #2. Memtest86+ eventually crashes.

Exact same veresion of memtest86+, booted from an older CD, which will have been built with an older gcc, zero problems.

Maybe someone should report to the author?

----------

## jcat

Maybe it would be better to file a bug on bugs.gentoo.org, then let the memtest maintainer report to upstream.  That way there'll be a record of it on bugs for other to find (who don't use the forum).

Cheers,

jcat

----------

## devsk

 *jimhend~1 wrote:*   

> on both versions of memtest test1 passes fine.
> 
> then shortly into test #2 when the test is described as ffffffffff
> 
> literally thousands of errors occur ,
> ...

 exact same observations here. Its a bug.

----------

## Leio

memtest86 is known to miscompile with gcc4.3 in the coreboot open source firmware community where I participate - they use it extensively to test if RAM has been setup right, and caution contributors of this miscompile fact.

Ensuring bugs in bugzilla exist would be nice, it might be possible to patch it to work right.

----------

## Gentree

just found the same problem whilst trying to verify a system after lightning storm EMP damage.

Had me going for a while until I noticed all memory I tried in two different mobos tripped out in the same way. I tested same with memtest86+ v 1.65 from a liveCD and got a clean run.

It fails about 20% into test #2, ie very shortly after starting.

Currently I build with gcc-4.2.3 

Sadly portage currently only offers memtest86+-2.01

My guess is that some CFLAGS may need filtering. In any case this should be masked until the issue is resolved. A broken memtest is a whole waste of time when you are counting on solid tools to bebug hardware issues.

This has dented by confidence in both memtest86+ and portage.

 :Evil or Very Mad: 

----------

## Gentree

OK a quick test shows 2.01 build with 3.3.5 was good with my current -O2 CFLAGS and LDFLAGS.

Equally building with 4.2.3 and null flags made it work too.

until this gets properly debugged the following seems to give a correctly working memtest.

```
CFLAGS= "" LDFLAGS="" emerge memtest86+

```

 :Cool: 

----------

