Unwinding through V8

119 views
Skip to first unread message

snek

unread,
Jul 5, 2024, 1:55:00 PM7/5/24
to v8-dev
Can foreign exceptions unwind through V8? In particular I'm curious if rust code interfacing with V8 needs to be marked as unsafe for unwinding. I see that V8 generally keeps track of stack pointers and also contains some machinery for managing eh_frame data but I'd appreciate some clarification on what behavior can be relied on. Thanks!

Ben Noordhuis

unread,
Jul 5, 2024, 2:29:12 PM7/5/24
to v8-...@googlegroups.com
On Fri, Jul 5, 2024 at 7:55 PM snek <sn...@chromium.org> wrote:
>
> Can foreign exceptions unwind through V8? In particular I'm curious if rust code interfacing with V8 needs to be marked as unsafe for unwinding. I see that V8 generally keeps track of stack pointers and also contains some machinery for managing eh_frame data but I'd appreciate some clarification on what behavior can be relied on. Thanks!

No, it can't. V8 is not exception/unwind-safe.

You can unwind in your own code but you need to catch it at the points
where control goes into or comes out of V8.
Reply all
Reply to author
Forward
0 new messages