Why subtract a frame from visited_frames in isolate.cc

9 views
Skip to first unread message

Yahan Lu (LuYahan)

unread,
Dec 12, 2025, 1:34:52 AM (5 days ago) Dec 12
to v8-dev

Hi V8 team,

I’m currently studying V8’s support for Intel CET (Control-flow Enforcement Technology) on x64, and I came across the following comment in the shadow stack handling code:

// We subtract a frame from visited_frames because otherwise the // shadow stack will drop the underlying interpreter entry trampoline // in which the handler runs. // // An interpreted frame cannot be the first frame we look at // because at a minimum, an exit frame into C++ has to separate // it and the context in which this C++ code runs.

https://chromium-review.googlesource.com/c/v8/v8/+/3289637/12/src/execution/isolate.cc

An interpreted JavaScript frame must never appear directly adjacent to C++ frames—it must always be separated by at least one exit frame.

Where I can find it's documents or code?

Reply all
Reply to author
Forward
0 new messages