summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-09-24 09:56:04 +0200
committerJo-Philipp Wich <jo@mein.io>2021-09-24 09:56:04 +0200
commitce4a7d96a648d37a95ebe07dfef522073c1b2fae (patch)
treec736345a8db0702b7b6804c1479e180cb2014352 /examples
parent218e8221a80a8fcf8bfd6cc115d7a0ae00a65ead (diff)
vm: reset callframes before invoking unhandled exception handler
Reset all callframes when dealing with an unhandled exception to avoid resuming the code which raised the exception when restarting the VM later, e.g. through uc_vm_call() or uc_vm_invoke(). Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/exception-handler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/exception-handler.c b/examples/exception-handler.c
index 1e722ec..a9a0299 100644
--- a/examples/exception-handler.c
+++ b/examples/exception-handler.c
@@ -30,7 +30,7 @@ static const char *program = MULTILINE_STRING(
doesnotexist();
}
- fail();
+ map([1], x => fail(x));
%}
);