[LLVMdev] Jump back to/return from runFunction
rmann at latencyzero.com
Tue Jan 29 23:08:48 PST 2013
On Jan 29, 2013, at 22:29 , edA-qa mort-ora-y <eda-qa at disemia.com> wrote:
> On 30/01/13 07:17, Rick Mann wrote:
>> If the executing code wants to return, it should just return. I take
>> it that doesn't work for you? You probably need to modify things so
>> that your JITed code can tolerate the host code returning, or it can
>> return some kind of error condition.
> The guest code in this case doesn't know that it will be returning. This
> "abort" conditions are detected and controlled by the host to detect
> misbehaving guest code. Therefore the guest can't be expected to
> cooperate in this situation.
> I'm not concerned about any tracking in the guest code, it will handle a
> premature finish just fine. I'm more worried about the LLVM internals:
> if I longjmp out of runFunction I'm assuming LLVM may leak resources, or
> be left in a dirty state.
> My guess is that exceptions won't actually work. This is because the
> guest code can actually use exceptions (or will, not yet in my case). I
> assume that if the host is also compiled with LLVM then the exception
> handling will interfere and the guest code will end up catching the
> exception and nonsense will ensue.
I'll have to defer to the experts on the list. I don't know enough, nor am I even sure it's possible to test conclusively.
More information about the llvm-dev