Skip to content
  • fpizlo@apple.com's avatar
    LLVM assertion failures should funnel into WTF's crash handling · cf3ac968
    fpizlo@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=123682
    
    Source/JavaScriptCore: 
    
    Reviewed by Geoffrey Garen.
            
    Inside llvmForJSC, we override assertion-related functions and funnel them
    into g_llvmTrapCallback(). We also now register a fatal error handler inside
    the library and funnel that into g_llvmTrapCallback, and have
    initializeAndGetJSCLLVMAPI() take such a callback as an argument.
            
    Inside JSC, we no longer call LLVMInstallFatalErrorHandler() but instead we
    pass WTFLogAlwaysAndCrash() as the trap callback for llvmForJSC.
    
    * llvm/InitializeLLVM.cpp:
    (JSC::initializeLLVM):
    * llvm/InitializeLLVMPOSIX.cpp:
    (JSC::initializeLLVMPOSIX):
    * llvm/library/LLVMExports.cpp:
    (llvmCrash):
    (initializeAndGetJSCLLVMAPI):
    * llvm/library/LLVMOverrides.cpp:
    (raise):
    (__assert_rtn):
    (abort):
    * llvm/library/LLVMTrapCallback.h: Added.
    
    Source/WTF: 
    
    Reviewed by Geoffrey Garen.
            
    Give JSC some new toys to play with for crash handling.
    
    * wtf/Assertions.cpp:
    * wtf/Assertions.h:
    
    Tools: 
    
    Reviewed by Geoffrey Garen.
            
    Need to disable LLVM's crash overrides so that we can do our own crash overrides.
    
    * Scripts/configure-llvm:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cf3ac968