diff options
Diffstat (limited to 'rts/StableName.c')
-rw-r--r-- | rts/StableName.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/StableName.c b/rts/StableName.c index 383d87e3db..4b26fee396 100644 --- a/rts/StableName.c +++ b/rts/StableName.c @@ -263,6 +263,9 @@ threadStableNameTable( evac_fn evac, void *user ) void gcStableNameTable( void ) { + // We must take the stable name lock lest we race with the nonmoving + // collector (namely nonmovingSweepStableNameTable). + stableNameLock(); FOR_EACH_STABLE_NAME( p, { // FOR_EACH_STABLE_NAME traverses free entries too, so @@ -286,6 +289,7 @@ gcStableNameTable( void ) } } }); + stableNameUnlock(); } /* ----------------------------------------------------------------------------- |