Version: 3.6 SVN OS: Linux Valgrind 3.6SVN (r11391) gives bogus warnings when trying to run i386 code without debug info: -- ddunbar@ozzy:tmp$ cat t.c int main() { return 0; } ddunbar@ozzy:tmp$ gcc t.c ddunbar@ozzy:tmp$ valgrind -q ./a.out ddunbar@ozzy:tmp$ gcc -m32 t.c ddunbar@ozzy:tmp$ valgrind -q ./a.out --82216-- WARNING: Serious error when reading debug info --82216-- When reading debug info from ./a.out: --82216-- Invalid Mach-O file (bad magic). --82216-- WARNING: Serious error when reading debug info --82216-- When reading debug info from ./a.out: --82216-- Error reading Mach-O object. ddunbar@ozzy:tmp$ gcc -g -m32 t.c ddunbar@ozzy:tmp$ valgrind -q ./a.out ddunbar@ozzy:tmp$ -- Reproducible: Always
Ah, I see what is happening here, this is because I had a .dSYM file in the current directory for a different arch. Here is a more complete test scenario: -- ddunbar@ozzy:foo$ echo "int main() { return 0; }" > t.c ddunbar@ozzy:foo$ gcc -g -m64 t.c ddunbar@ozzy:foo$ gcc -m32 t.c && valgrind -q ./a.out --82441-- WARNING: Serious error when reading debug info --82441-- When reading debug info from ./a.out: --82441-- Invalid Mach-O file (bad magic). --82441-- WARNING: Serious error when reading debug info --82441-- When reading debug info from ./a.out: --82441-- Error reading Mach-O object. ddunbar@ozzy:foo$ -- The error message makes more sense now, but it would be nice if it would either mention that the .dSYM file is what is out of date, or simply ignore it if the archs don't match.
The oldest mac I can access is 10.7 so I'm closing this.