Fixed the trace builder to correctly handle excpetion throwing instruction.
Added a new unit test 081-hot-exceptions to target this problem.
diff --git a/vm/mterp/out/InterpC-x86.c b/vm/mterp/out/InterpC-x86.c
index f8792bd..6492daf 100644
--- a/vm/mterp/out/InterpC-x86.c
+++ b/vm/mterp/out/InterpC-x86.c
@@ -1764,6 +1764,10 @@
*/
PERIODIC_CHECKS(kInterpEntryThrow, 0);
+#if defined(WITH_JIT)
+ // Something threw during trace selection - abort the current trace
+ interpState->jitState = kJitTSelectEnd;
+#endif
/*
* We save off the exception and clear the exception status. While
* processing the exception we might need to load some Throwable