http://llvm.org/bugs/show_bug.cgi?id=12125

             Bug #: 12125
           Summary: clang svn miscompiles codegrind/m_main.c in valgrind
                    3.7.0 at -O1 or higher
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


When clang 3.1svn is used to build valgrind 3.7.0 on x86_64-apple-darwin11, the
libcoregrind_x86_darwin_a-m_main.o i386 object file created from
coregrind/m_main.c is miscompiled at -O1 or higher such that static i386
executables on x86_64-apple-darwin11 that link in libcoregrind-x86-darwin.a,
which contains it, such as memcheck-x86-darwin, crash...

./memcheck-x86-darwin
Segmentation fault

This backtraces in gdb as...

gdb ./memcheck-x86-darwin
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...
(gdb) r
Starting program:
/sw/src/fink.build/valgrind-3.7.0-3/valgrind-3.7.0/.in_place/memcheck-x86-darwin
 

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x00000000
valgrind_main () at m_main.c:1435
1435       struct vki_rlimit zero = { 0, 0 };
(gdb) bt
#0  valgrind_main () at m_main.c:1435
#1  0x38037309 in _start_in_C_darwin (pArgc=0x33fff810) at m_main.c:2898
Current language:  auto; currently minimal
(gdb) 

Compiling just libcoregrind_x86_darwin_a-m_main.o at -O0, eliminates these
crashes in the static i386 executables in valgrind.

This issue also exists as radar://10942455

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to