[LLVMdev] JIT crash takes down host-application

Martin C. Martin martin at martincmartin.com
Sun Jul 18 10:59:05 PDT 2010


Those shouldn't be crashes.

assert(foo) turns into:

if (! foo) {
    fprintf(stderr, ...assertmsg...);
    abort();
}

abort() exits the program without the usual cleanup.  That's not a 
crash.  If you want an failed assertion to do something else, you can 
always define your own assert().

As for calling an external function that can't be resolved, perhaps 
there's a return code somewhere you're ignoring?

Best,
Martin

On 7/18/2010 1:44 PM, Frank Fuchs wrote:
> Hi,
>
> I'm doing some tests concerning the embedding of LLVM and clan in my application.
> Now I stumbled across the following ... which disturbs me. If the jitted program crashes,
> like e.g. if it contains an assert(0==1) or calls an external function which cannot be resolved,
> the hosting app goes down as well. There seems no error catch.
>
> Can this anyhow be circumvented?
>
> -Frank
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list