rts: Fix segfault when using non-moving GC with profiling
rts: Fix segfault when using non-moving GC with profiling
nonMovingCollect()
swaps out the static_flag
value used as a
sentinel for gct->scavenged_static_objects
, but the subsequent call
resetStaticObjectForProfiling()
sees the old value of static_flag
used as
the sentinel and segfaults. So we must call resetStaticObjectForProfiling()
before calling nonMovingCollect()
as otherwise it looks for the incorrect
sentinel value
Fixes #25232 (closed) and #23958 (closed)
Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled.