Commit d5aa75c
authored
Fix lifetime1 test (#55371)
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 #540421 parent b814a97 commit d5aa75c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments