Repository navigation
Commit 557d286
ParparVM GC: never name a thread that may have exited
A collection that cannot stop a thread records a root miss and skips the
sweep, then names each missed thread with pthread_getname_np. The thread
it could not stop is usually one that is exiting: markDeadThread
deregisters it and the pthread ends, so the recorded handle can name a
thread that no longer exists, and glibc reads its freed descriptor. The
bulk conformance run, whose pool checks start and retire many threads,
crashed with SIGSEGV in this diagnostic right after the skip line
(vm-tests, StringBuilderGrowthApp, exit 139).
The name is now read only for a handle still registered in allThreads,
under the critical section markDeadThread takes, and blocked threads are
released before that lock is taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 49bddf5 commit 557d286
1 file changed
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7333 | 7333 | | |
7334 | 7334 | | |
7335 | 7335 | | |
| 7336 | + | |
| 7337 | + | |
| 7338 | + | |
| 7339 | + | |
7336 | 7340 | | |
7337 | 7341 | | |
7338 | 7342 | | |
7339 | 7343 | | |
7340 | | - | |
| 7344 | + | |
| 7345 | + | |
| 7346 | + | |
| 7347 | + | |
| 7348 | + | |
| 7349 | + | |
| 7350 | + | |
| 7351 | + | |
| 7352 | + | |
| 7353 | + | |
7341 | 7354 | | |
7342 | | - | |
| 7355 | + | |
| 7356 | + | |
| 7357 | + | |
| 7358 | + | |
| 7359 | + | |
| 7360 | + | |
| 7361 | + | |
| 7362 | + | |
| 7363 | + | |
| 7364 | + | |
7343 | 7365 | | |
7344 | 7366 | | |
7345 | 7367 | | |
7346 | 7368 | | |
7347 | 7369 | | |
7348 | 7370 | | |
7349 | | - | |
7350 | 7371 | | |
7351 | 7372 | | |
7352 | 7373 | | |
| |||
0 commit comments