Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The test assumed that a GC didn't occur between the last use of a variable and a check of a value set in the finalizer. This presumably worked up until now because the test is set to build in debuggable code mode. But R2R compilations ignore that and build with optimization enabled, and GCStress exposes the issue. Fix the test by explicitly marking a variable as KeepAlive until after the requisite check. Fixes #54042
- Loading branch information