winch: Check for stack overflow#7774
Conversation
3b28906 to
b11b526
Compare
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
There was a problem hiding this comment.
LGTM, thanks! Just a comment regarding tests, and after that this should be ready to land.
Regarding filetests and disassembly, -- as mentioned offline -- I think it's a very reasonable thing to do. I just couldn't come up with a straightforward and sound way to do it, in the brief exploration that I did for this. I'd like to keep labels around for filetests that require jumps and such, if possible. Perhaps we can continue the discussion in #7552?
b11b526 to
1d86e5d
Compare
|
I think this is due to incomplete unwind information encoding in Windows. All test that involve traps, currently fail on Windows for this reason. I think it's fine to ignore the tests introduced in this PR, temporarily in https://github.com/bytecodealliance/wasmtime/blob/main/build.rs#L210 |
Thank you for tracking this down! I was really dreading having to debug a windows failure 😅 |
|
Also in an argument for merging #7782 first, removing instruction offsets cuts the diff of this PR in half 👍 |
796e743 to
c255c98
Compare
Add stack overflow checking to the x64 backend in winch, and enable the runtime test for overflow. The method for checking for overflow is to compare
spagainst the stack limit fromvmctxafter the stack pointer has been adjusted to hold the locals for the function.