Skip to content

Non-moving mark thread can race with stack squeezing

During a stress-test I noticed a reliable segmentation fault in the non-moving collector. The cause appears to be the following:

  1. ???
  2. (mark) the mark thread starts marking a stack chunk
  3. (mut) meanwhile, the thread owning the chunk pauses
  4. (mut) we decide to squeeze the stack
  5. (mut) stackSqueeze writes to the stack, confusing mark
  6. (mark) crashes
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information