[LLVMbugs] [Bug 9808] New: misaligned stack error, possibly involving passing/returning structs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 28 10:49:26 PDT 2011


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

           Summary: misaligned stack error, possibly involving
                    passing/returning structs
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tjw at omnigroup.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6510)
 --> (http://llvm.org/bugs/attachment.cgi?id=6510)
example

When built with ToT clang (r130400) the attached sample dies with a misaligned
stack error:

/Volumes/Space/Users/bungi/Source/LLVM/llvm/Release+Asserts/bin/clang -x
objective-c -arch i386 -fmessage-length=0 -std=gnu99 -Wno-trigraphs
-fpascal-strings -O0 -mdynamic-no-pic -Werror -Wreturn-type -Wmissing-braces
-Wparentheses -Wswitch -Wunused-function -Wunused-label -Wno-unused-parameter
-Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Wnewline-eof
 -fexceptions -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2  -Wall
-Wno-#warnings -Wno-trigraphs -Winit-self -Wall -Wno-#warnings -Wno-trigraphs
-Winit-self  -DNS_BUILD_32_LIKE_64   misaligned-stack-error.m -o
misaligned-stack-error -framework AppKit -framework Foundation

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x00000000
0x90f37ed0 in misaligned_stack_error_ ()
(gdb) bt
#0  0x90f37ed0 in misaligned_stack_error_ ()
#1  0x00000018 in ?? ()
#2  0x00001b11 in -[MyView initWithFrame:] (self=0x5057d0, _cmd=0x97a359c0,
frame={origin = {x = 0, y = 0}, size = {width = 200, height = 200}}) at
misaligned-stack-error.m:30
#3  0x00001c99 in -[MisalignedStackErrorViewController loadView]
(self=0x108e70, _cmd=0x97b1db28) at misaligned-stack-error.m:52
#4  0x00001dba in main (argc=1, argv=0xbfffef80) at misaligned-stack-error.m:62


But when built with /Developer/usr/bin/clang (as shipped with Xcode 4.0.1),
there is no such problem:
        2011-04-28 10:48:17.610 misaligned-stack-error[29848:903] ***
__NSAutoreleaseNoPool(): Object 0x405ef0 of class NSCFString autoreleased with
no pool in place - just leaking
        2011-04-28 10:48:17.612 misaligned-stack-error[29848:903] bounds = {{0,
0}, {200, 200}}
        2011-04-28 10:48:17.612 misaligned-stack-error[29848:903] view =
<MyView: 0x405ab0>

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