[PATCH] D71091: Make sure that the implicit arguments for direct methods have been setup
Pierre Habouzit via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 11:47:44 PST 2019
MadCoder added a comment.
In D71091#1773066 <https://reviews.llvm.org/D71091#1773066>, @liuliu wrote:
> With this latest fix applied on top of b220662a45c8067a2ae485ae34c1138d93506df9 <https://reviews.llvm.org/rGb220662a45c8067a2ae485ae34c1138d93506df9>, in our company's internal code, I still encounter the crash.
>
> Showing All Messages
> /Users/liuliu/Snapchat/Dev/phantom/3. Libraries/Storage/DocObject/Implementations/SCSQLiteDocObjectContext/Tests/Generated/SCTestMainEntityChangeRequest.mm:338:25: LLVM IR generation of compound statement ('{}')
> /Users/liuliu/Snapchat/Dev/phantom/0 clang-10 0x000000010b9edf0c llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 60
> 1 clang-10 0x000000010b9ee4c9 PrintStackTraceSignalHandler(void*) + 25
> /Users/liuliu/Snapchat/Dev/phantom/2 clang-10 0x000000010b9ec086 llvm::sys::RunSignalHandlers() + 118
> 3 clang-10 0x000000010b9f1e6c SignalHandler(int) + 252
> 4 libsystem_platform.dylib 0x00007fff65d8eb5d _sigtramp + 29
> 5 libsystem_platform.dylib 0x00007ffee7e9b790 _sigtramp + 18446744071596723280
> /Users/liuliu/Snapchat/Dev/phantom/6 clang-10 0x000000010bfdff14 clang::CodeGen::CodeGenTypes::arrangeObjCMethodDeclaration(clang::ObjCMethodDecl const*) + 52
> /Users/liuliu/Snapchat/Dev/phantom/7 clang-10 0x000000010c1f6bcd (anonymous namespace)::CGObjCCommonMac::GenerateDirectMethod(clang::ObjCMethodDecl const*, clang::ObjCContainerDecl const*) + 285
> /Users/liuliu/Snapchat/Dev/phantom/8 clang-10 0x000000010c1f63e9 (anonymous namespace)::CGObjCCommonMac::EmitMessageSend(clang::CodeGen::CodeGenFunction&, clang::CodeGen::ReturnValueSlot, clang::QualType, clang::Selector, llvm::Value*, clang::QualType, bool, clang::CodeGen::CallArgList const&, clang::ObjCMethodDecl const*, clang::ObjCInterfaceDecl const*, (anonymous namespace)::ObjCCommonTypesHelper const&) + 1401
> /Users/liuliu/Snapchat/Dev/phantom/9 clang-10 0x000000010c205b14 (anonymous namespace)::CGObjCNonFragileABIMac::GenerateMessageSend(clang::CodeGen::CodeGenFunction&, clang::CodeGen::ReturnValueSlot, clang::QualType, clang::Selector, llvm::Value*, clang::CodeGen::CallArgList const&, clang::ObjCInterfaceDecl const*, clang::ObjCMethodDecl const*) + 644
>
>
> It indeed won't crash any more in trivial examples. I need to have some other time to reduce my local example to a reasonable size.
This seems like the problem I just fixed, did you use the latest patch? because the problem was that we didn't bother to emit the implicit arguments for just prototypes before as it was only used by CodeGen of the implementations. This patch is supposed to add it to all declarations now, so I fail to understand how it can be missing anywhere ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71091/new/
https://reviews.llvm.org/D71091
More information about the cfe-commits
mailing list