hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

[cppia] Fix missing jit exception checks for method calls

Open tobil4sk opened this issue 8 months ago • 2 comments

Even with #1188, some checks for jit exceptions in interp code were still missing. This causes control flow bugs when local functions interact with other code, as they are currently not jit compiled.

In short, we have to make sure an exception hasn't been thrown after evaluating the object for a method call.

tobil4sk avatar Apr 10 '25 15:04 tobil4sk

@hughsando Please check!

Simn avatar Apr 11 '25 03:04 Simn

@hughsando Please check!

It would be worth double checking if the full BCR_CHECKs are required in all cases, perhaps in some places it's enough just to check only ctx->exception.

CallFunExpr has the full check after getting this, and CallDynamicFunction has it after each argument, so I based my changes off those two. Perhaps there was a genuine reason why Call, CallHaxe and CallMemberVTable might not require the BCR check everywhere.

tobil4sk avatar Apr 11 '25 12:04 tobil4sk