Ignore:
Timestamp:
Oct 16, 2013, 8:47:27 PM (12 years ago)
Author:
[email protected]
Message:

libllvmForJSC shouldn't call exit(1) on report_fatal_error()
https://bugs.webkit.org/show_bug.cgi?id=122905
<rdar://problem/15237856>

Source/JavaScriptCore:

Reviewed by Michael Saboff.

Expose the new LLVMInstallFatalErrorHandler() API through the soft linking magic and
then always call it to install something that calls CRASH().

  • llvm/InitializeLLVM.cpp:

(JSC::llvmCrash):
(JSC::initializeLLVMOnce):
(JSC::initializeLLVM):

  • llvm/LLVMAPIFunctions.h:

WebKitLibraries:

Reviewed by Michael Saboff.

  • LLVMIncludesMountainLion.tar.bz2:
  • LLVMLibrariesMountainLion.tar.bz2:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/llvm/InitializeLLVM.cpp

    r157260 r157558  
    2929#if HAVE(LLVM)
    3030
     31#include "LLVMAPI.h"
    3132#include <pthread.h>
    3233
     
    3536static pthread_once_t initializeLLVMOnceKey = PTHREAD_ONCE_INIT;
    3637
     38static NO_RETURN_DUE_TO_CRASH void llvmCrash(const char* reason)
     39{
     40    WTFLogAlways("LLVM failure: %s", reason);
     41    CRASH();
     42}
     43
     44static void initializeLLVMOnce()
     45{
     46    initializeLLVMImpl();
     47   
     48    llvm->InstallFatalErrorHandler(llvmCrash);
     49}
     50
    3751void initializeLLVM()
    3852{
    39     pthread_once(&initializeLLVMOnceKey, initializeLLVMImpl);
     53    pthread_once(&initializeLLVMOnceKey, initializeLLVMOnce);
    4054}
    4155
Note: See TracChangeset for help on using the changeset viewer.