[LLVMbugs] [Bug 9294] New: Objective-C: CodeGen failure when generating getters for properties marked "retain" (GNUstep runtime, fragile ABI)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 23 05:21:46 PST 2011


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

           Summary: Objective-C: CodeGen failure when generating getters
                    for properties marked "retain" (GNUstep runtime,
                    fragile ABI)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: thebeing+llvm at halbordnung.de
                CC: llvmbugs at cs.uiuc.edu, csdavec at swan.ac.uk


Hello,

under some conditions, clang (r126310) does not correctly generate getters for
Objective-C properties that are marked with "retain". This happens when using
the GNUstep runtime without the new non-fragile ABI (i.e. when
-fobjc-nonfragile-abi is not specified). The machine is x86_64 Linux. A reduced
test-case is attached. The call trace is as follows:

clang: Instructions.cpp:196: void llvm::CallInst::init(llvm::Value*,
llvm::Value* const*, unsigned int): Assertion `(i >= FTy->getNumParams() ||
FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad
signature!"' failed.
0  clang           0x0000000001646a6f
1  clang           0x0000000001648cd2
2  libpthread.so.0 0x00007fd39dbf5f60
3  libc.so.6       0x00007fd39cd00165 gsignal + 53
4  libc.so.6       0x00007fd39cd02f70 abort + 384
5  libc.so.6       0x00007fd39ccf92b1 __assert_fail + 241
6  clang           0x0000000001578512 llvm::CallInst::init(llvm::Value*,
llvm::Value* const*, unsigned int) + 418
7  clang           0x0000000000793fe3
clang::CodeGen::CodeGenFunction::EmitCall(clang::CodeGen::CGFunctionInfo
const&, llvm::Value*, clang::CodeGen::ReturnValueSlot,
llvm::SmallVector<std::pair<clang::CodeGen::RValue, clang::QualType>, 16u>
const&, clang::Decl const*, llvm::Instruction**) + 1379
8  clang           0x0000000000803729
clang::CodeGen::CodeGenFunction::GenerateObjCGetter(clang::ObjCImplementationDecl*,
clang::ObjCPropertyImplDecl const*) + 1065
9  clang           0x000000000076cacf
clang::CodeGen::CodeGenModule::EmitObjCPropertyImplementations(clang::ObjCImplementationDecl
const*) + 959
10 clang           0x00000000007711b0
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 624
11 clang           0x0000000000762914
12 clang           0x0000000000762301
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 161
13 clang           0x00000000008849c5 clang::ParseAST(clang::Sema&, bool) + 165
14 clang           0x0000000000761814 clang::CodeGenAction::ExecuteAction() +
68
15 clang           0x0000000000645c1b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 347
16 clang           0x000000000062090c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
17 clang           0x0000000000618314 cc1_main(char const**, char const**, char
const*, void*) + 468
18 clang           0x000000000061f915 main + 4629
19 libc.so.6       0x00007fd39ccecc4d __libc_start_main + 253
20 clang           0x0000000000616a29
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test.m -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -resource-dir /usr/local/bin/../lib/clang/2.9
-I /usr/GNUstep/System/Library/Headers/gnu-gnu-gnu/ -I
/usr/GNUstep/System/Library/Headers/gnu-gnu-gnu/x86_64/linux-gnu -ferror-limit
19 -fmessage-length 142 -fgnu-runtime -fobjc-exceptions
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/user/5001/cc-IJ6QXo.o -x
objective-c test.m

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