You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Mono]: JIT/Methodical/eh/finallyexec/loopinfinally_do and JIT/Methodical/eh/finallyexec/loopinfinally_ro fails on Mono Windows. #65704
The problem is when we jump, since we will jump back to start of BB, so we will continue to decrement RSP with param_area for each iteration, and that will crash when we exit the finally block (since it won't adjust for all decrements of RSP).
This is an issue on all platforms using an ABI that have a param_area that is larger than 0, currently true on Windows x64 using 32 byte param_area.
Issue detected when enabling CoreCLR runtime tests running on Mono Windows, #64281. As part of that PR, the tests have been disabled on Mono and marked with this issue for future tracking.
@lateralusX I tagged this one for 7, but maybe it's ok to push back to 8? the issue seems well-understood and I guess a fix might be to emit the handler preamble into a separate BB before the body of the finally clause so that branches back to the start of the finally do not re-execute it. not sure how easy that would be to do in method-to-ir.
I think we can push it to 8, its a special case when using goto inside a finally clause and the solution is emitting two different basic blocks, one when entering the finally clause and the other that will be the goto target, but if I recalled correctly the change had some implications on the current logic so was not trivial to do, at least not when I decided to file the issue instead of fixing it right away.
Since we didn't hit this issue on official supported platforms (not depending on a param area like Win x64 ABI does) and since its a corner case, a fix has not been prioritized or planned (issue marked as future at the moment).
Activity
lambdageek commentedon Jul 14, 2022
@lateralusX I tagged this one for 7, but maybe it's ok to push back to 8? the issue seems well-understood and I guess a fix might be to emit the handler preamble into a separate BB before the body of the finally clause so that branches back to the start of the finally do not re-execute it. not sure how easy that would be to do in method-to-ir.
lateralusX commentedon Jul 14, 2022
I think we can push it to 8, its a special case when using goto inside a finally clause and the solution is emitting two different basic blocks, one when entering the finally clause and the other that will be the goto target, but if I recalled correctly the change had some implications on the current logic so was not trivial to do, at least not when I decided to file the issue instead of fixing it right away.
SamMonoRT commentedon Aug 10, 2022
Moving to 8.0.0 and assigning to @lateralusX for tracking
Xinlong-Wu commentedon Jan 5, 2024
Hi, I got same problem on RISCV64 Arch. Do we have any progress on this issue?
cc: #96117
lateralusX commentedon Jan 8, 2024
Since we didn't hit this issue on official supported platforms (not depending on a param area like Win x64 ABI does) and since its a corner case, a fix has not been prioritized or planned (issue marked as future at the moment).