From: Stan G. <sgo...@ho...> - 2005-10-30 19:47:58
|
Yes, this program runs OK on the 64-bit machine without Valgrind. For example, if environment variable TEST is not set, the output from the program is: TEST=(null) Thanks for your reply. Stan In message <5.1...@po...> Stan Goldberg wrote: > We compile and link on machine A running Red Hat Linux release 9, for > which uname returns: > > Linux royal53.prod.houston.nam.slb.com 2.4.20-31.9.progeny.5smp #1 SMP Tue > Aug 10 01:31:24 EDT 2004 i686 i686 i386 GNU/Linux > > then run the executables successfully on machine B running Red Hat > Enterprise Linux WS release 3, for which uname returns: > > Linux hya0001.prod.houston.nam.slb.com 2.4.21-20.EL #1 SMP Wed Aug 18 > 20:34:58 EDT 2004 x86_64 x86_64 x86_64 GNU/Linux > > From previous postings, I thought that if Valgrind were built on machine > A, it would run OK on machine B for 32-bit executables. However, if I > build Valgrind on machine A, then build an executable on machine A for a > program like: > > #include > #include > > main() > { > char *s; > > s = getenv("TEST"); > > printf ("TEST=%s\n", s); > } That should work fine, and it does for me although I've always used rather newer distributions than that when doing it. > ==30744== Process terminating with default action of signal 11 (SIGSEGV): > dumping core > ==30744== at 0x1B8E8B47: _dl_map_object (in /lib/ld-2.3.2.so) > ==30744== by 0x1B8E6B29: dl_main (in /lib/ld-2.3.2.so) > ==30744== by 0x1B8F3947: _dl_sysdep_start (in /lib/ld-2.3.2.so) > ==30744== by 0x1B8E50B4: _dl_start (in /lib/ld-2.3.2.so) > ==30744== by 0x1B8E4C66: (within /lib/ld-2.3.2.so) Well something in the dynamic linker performed a dodgy memory reference for some reason, but memcheck didn't spot it. I assume this program runs fine on the 64 bit box without valgrind? Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |