[LLVMbugs] [Bug 2826] New: google-perftools GetStackTrace fails under LLVM

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Sep 23 23:42:29 PDT 2008


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

           Summary: google-perftools GetStackTrace fails under LLVM
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2038)
 --> (http://llvm.org/bugs/attachment.cgi?id=2038)
GetStackTrace extracted testcase

google-perftools includes a heap checker which works by a malloc replacement.
The attached testcase is an extraction from the larger code, which tries to
retrieve a stack trace. For some reason, this program doesn't work under LLVM:

  $ g++ -Wall -pedantic reduced.cpp -o reduced -g -O0
  $ ./reduced 
  0x80483f1
  0xf7cea455
  0x80485be
  $ llvm-g++ -Wall -pedantic reduced.cpp -o reduced -g -O0
  $ ./reduced 
  $ 

I realize that 'stack' isn't entirely defined in the C standard, but I don't
think this program is invoking undefined behaviour in a way that LLVM is
allowed to optimize away. Changing optz'n levels and debugging on/off has no
effect. The program is valgrind clean, no matter how it's compiled.

I'm seeing this problem on i386. I haven't tried x86_64.


-- 
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.



More information about the llvm-bugs mailing list