[PATCH] D71091: Make sure that the implicit arguments for direct methods have been setup

Liu Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 10:23:37 PST 2019


liuliu added a comment.

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
  /Users/liuliu/Snapchat/Dev/phantom/10 clang-10                 0x000000010c1931b1 clang::CodeGen::CGObjCRuntime::GeneratePossiblySpecializedMessageSend(clang::CodeGen::CodeGenFunction&, clang::CodeGen::ReturnValueSlot, clang::QualType, clang::Selector, llvm::Value*, clang::CodeGen::CallArgList const&, clang::ObjCInterfaceDecl const*, clang::ObjCMethodDecl const*, bool) + 433
  /Users/liuliu/Snapchat/Dev/phantom/11 clang-10                 0x000000010c1942d2 clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(clang::ObjCMessageExpr const*, clang::CodeGen::ReturnValueSlot) + 2818
  /Users/liuliu/Snapchat/Dev/phantom/12 clang-10                 0x000000010c15cda8 (anonymous namespace)::ScalarExprEmitter::VisitObjCMessageExpr(clang::ObjCMessageExpr*) + 184
  /Users/liuliu/Snapchat/Dev/phantom/13 clang-10                 0x000000010c15522b clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 6523
  /Users/liuliu/Snapchat/Dev/phantom/14 clang-10                 0x000000010c14a309 (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) + 73
  /Users/liuliu/Snapchat/Dev/phantom/15 clang-10                 0x000000010c14a26d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 189
  /Users/liuliu/Snapchat/Dev/phantom/16 clang-10                 0x000000010c1a209f emitARCRetainCallResult(clang::CodeGen::CodeGenFunction&, clang::Expr const*) + 31
  /Users/liuliu/Snapchat/Dev/phantom/17 clang-10                 0x000000010c1a1eb4 clang::CodeGen::CodeGenFunction::EmitARCReclaimReturnedObject(clang::Expr const*, bool) + 116
  /Users/liuliu/Snapchat/Dev/phantom/18 clang-10                 0x000000010c1650ff (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 4511
  /Users/liuliu/Snapchat/Dev/phantom/19 clang-10                 0x000000010c15a5d8 clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::VisitImplicitCastExpr(clang::ImplicitCastExpr*) + 40
  /Users/liuliu/Snapchat/Dev/phantom/20 clang-10                 0x000000010c154d93 clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 5347
  /Users/liuliu/Snapchat/Dev/phantom/21 clang-10                 0x000000010c14a309 (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) + 73
  /Users/liuliu/Snapchat/Dev/phantom/22 clang-10                 0x000000010c14a26d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 189
  /Users/liuliu/Snapchat/Dev/phantom/23 clang-10                 0x000000010c0c1c37 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) + 167
  /Users/liuliu/Snapchat/Dev/phantom/24 clang-10                 0x000000010c0e6543 emitPseudoObjectExpr(clang::CodeGen::CodeGenFunction&, clang::PseudoObjectExpr const*, bool, clang::CodeGen::AggValueSlot) + 1379
  /Users/liuliu/Snapchat/Dev/phantom/25 clang-10                 0x000000010c0e5fb0 clang::CodeGen::CodeGenFunction::EmitPseudoObjectRValue(clang::PseudoObjectExpr const*, clang::CodeGen::AggValueSlot) + 112
  /Users/liuliu/Snapchat/Dev/phantom/26 clang-10                 0x000000010c15d999 (anonymous namespace)::ScalarExprEmitter::VisitPseudoObjectExpr(clang::PseudoObjectExpr*) + 89

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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71091/new/

https://reviews.llvm.org/D71091





More information about the cfe-commits mailing list