Trap registry

This commit is contained in:
Artur Jamro
2019-09-19 17:20:46 -07:00
committed by Dan Gohman
parent d1706117e5
commit fa9175f9e5
12 changed files with 248 additions and 19 deletions

View File

@@ -408,6 +408,10 @@ HandleTrap(CONTEXT* context)
{
assert(sAlreadyHandlingTrap);
if (!CheckIfTrapAtAddress(ContextToPC(context))) {
return false;
}
RecordTrap(ContextToPC(context));
// Unwind calls longjmp, so it doesn't run the automatic

View File

@@ -11,6 +11,7 @@
extern "C" {
#endif
int8_t CheckIfTrapAtAddress(const uint8_t* pc);
// Record the Trap code and wasm bytecode offset in TLS somewhere
void RecordTrap(const uint8_t* pc);