Remove custom signal handler restrictions (#1843)
* remove custom signal handler origin restriction * add a test for handling signals from a hostcall * cargo fmt
This commit is contained in:
@@ -589,11 +589,6 @@ impl<'a> CallThreadState<'a> {
|
||||
return ptr::null();
|
||||
}
|
||||
|
||||
// If this fault wasn't in wasm code, then it's not our problem
|
||||
if !(self.is_wasm_code)(pc as usize) {
|
||||
return ptr::null();
|
||||
}
|
||||
|
||||
// First up see if any instance registered has a custom trap handler,
|
||||
// in which case run them all. If anything handles the trap then we
|
||||
// return that the trap was handled.
|
||||
@@ -603,6 +598,11 @@ impl<'a> CallThreadState<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
// If this fault wasn't in wasm code, then it's not our problem
|
||||
if !(self.is_wasm_code)(pc as usize) {
|
||||
return ptr::null();
|
||||
}
|
||||
|
||||
// TODO: stack overflow can happen at any random time (i.e. in malloc()
|
||||
// in memory.grow) and it's really hard to determine if the cause was
|
||||
// stack overflow and if it happened in WebAssembly module.
|
||||
|
||||
Reference in New Issue
Block a user