[LLVMdev] Jump back to/return from runFunction

edA-qa mort-ora-y eda-qa at disemia.com
Tue Jan 29 22:29:46 PST 2013


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.


-- 
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130130/4f34bd1a/attachment.sig>


More information about the llvm-dev mailing list