[LLVMbugs] [Bug 13229] New: LLVM segfault with zero-sized struct return in Objective-C

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 28 12:46:25 PDT 2012


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

             Bug #: 13229
           Summary: LLVM segfault with zero-sized struct return in
                    Objective-C
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: arthur.j.odwyer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8785
  --> http://llvm.org/bugs/attachment.cgi?id=8785
output of "clang -c -v test.m"

cat >test.m <<EOF
typedef struct {} Z;
@interface A -(void)foo:(Z)a; @end
@implementation A -(void)foo:(Z)a {} @end
EOF
clang -c test.m

The original crash was in a different place from the reduced test case's crash
(namely, llvm::SmallVectorImpl<char>::swap, with llvm::ParseIR higher up the
stack). Perhaps it's an uninitialized-pointer bug.

0  clang             0x000000010cdc93e2 _ZL15PrintStackTracePv + 34
1  clang             0x000000010cdc9869 _ZL13SignalHandleri + 553
2  libsystem_c.dylib 0x00007fff85c40cfa _sigtramp + 26
3  libsystem_c.dylib 0x00000000000001f1 _sigtramp + 18446603338271946001
4  clang             0x000000010c0f2be8 llvm::Constant::getRelocationInfo()
const + 312
5  clang             0x000000010c0f2be8 llvm::Constant::getRelocationInfo()
const + 312
6  clang             0x000000010c0f2be8 llvm::Constant::getRelocationInfo()
const + 312
7  clang             0x000000010c0e5f63
llvm::TargetLoweringObjectFile::getKindForGlobal(llvm::GlobalValue const*,
llvm::TargetMachine const&) + 787
8  clang             0x000000010c0f2244
llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + 308
9  clang             0x000000010c0f1c6f
llvm::AsmPrinter::doFinalization(llvm::Module&) + 79

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