Repository navigation
Commit aa9e74e
[wasm] Recognize R2R virtual IPs in IsManagedCode (#133266)
Fixes #133264.
`ExecutionManager::IsManagedCodeWorker` looks up wasm R2R virtual
instruction pointers in the native code-range map, incorrectly
classifying managed funclet callers as native. GC stack walking inside a
normally called nested finally can then assert `fFrameWasUnwound` in
`stackwalk.cpp`.
Route wasm virtual IPs through the existing `FindCodeRange(...,
ScanNoReaderLock)` lookup. Native addresses retain `GetRangeSection` and
its existing lock-state handling. Registered virtual ranges still
undergo the existing R2R method check, including its deadlock-safe early
return when no `MethodDesc` is requested.
Add a two-case nested-finally regression covering normal and exceptional
entry, explicit GC, expected exception handling, and the post-GC array
value.
### Validation
Reused completed local validation from the source worktree after
confirming that the isolated branch has the identical `main` base tree
(`de29e26a4f69da5d446900a6ba9d68ba3ddc5ba9`) and both changed files
match byte-for-byte; no new build was run in the publication worktree.
- Browser-wasm Checked runtime build and targeted `corerun` rebuild
succeeded; `Methodical_do` and `Methodical_d1` were rebuilt with the new
cases.
- The unmodified native host asserts `fFrameWasUnwound` on the first new
case in both runners.
- The fixed native host passes both new cases and the existing
`Test_throwinfinallynestedintry_30_cs` in each runner: six focused
passes.
- Independence control: `Methodical_do`, recompiled with the saved
unmodified cross-JIT, passes both new cases and the existing `_30` test
with the fixed native runtime.
Execution used the browser-wasm R2R runner under Node.js on macOS ARM64
with a retained managed Core_Root. Graphical-browser and native-ARM64
execution were not performed.
This PR contains no JIT changes and is independent of the separate
conditional-EH-fallthrough fix. It is also distinct from #133219's
post-catch cooperative-mode restoration; no GC-mode patch was applied
for this validation.
> [!NOTE]
> This PR description was generated by GitHub Copilot from the reviewed
patch and local validation evidence.
Co-authored-by: Copilot App <[email protected]>1 parent de29e26 commit aa9e74e
2 files changed
Lines changed: 65 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5688 | 5688 | | |
5689 | 5689 | | |
5690 | 5690 | | |
5691 | | - | |
| 5691 | + | |
| 5692 | + | |
| 5693 | + | |
| 5694 | + | |
| 5695 | + | |
| 5696 | + | |
| 5697 | + | |
| 5698 | + | |
| 5699 | + | |
| 5700 | + | |
| 5701 | + | |
5692 | 5702 | | |
5693 | 5703 | | |
5694 | 5704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
58 | 112 | | |
0 commit comments