Repository navigation
Commit 2d093c9
authored
Take each block's zero lock in the incremental start-age test hook (#437)
__hxcpp_gc_incremental_test(10), which IncrementalGcStartSweep calls between collections, read every block's start bits and object headers without a lock while the zeroing thread could be reclaiming the same block under its mZeroLock. The hook now holds each block's mZeroLock while it reads the block, as the incremental sweep does. Only HXCPP_GC_INCREMENTAL_TEST builds read blocks this way. In a 40-run TSan loop on the ubuntu-26.04 image, main had reports in 2 runs and this change in 0.
Fixes #4361 parent e204796 commit 2d093c9
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7263 | 7263 | | |
7264 | 7264 | | |
7265 | 7265 | | |
7266 | | - | |
| 7266 | + | |
| 7267 | + | |
| 7268 | + | |
| 7269 | + | |
| 7270 | + | |
| 7271 | + | |
| 7272 | + | |
| 7273 | + | |
| 7274 | + | |
| 7275 | + | |
7267 | 7276 | | |
7268 | 7277 | | |
7269 | 7278 | | |
| |||
0 commit comments