Commit af434d1
committed
fs: Don't unref luv_dir_t until after we're actually sure it's okay to GC it
It was technically possible for the luv_dir_t to be garbage collected, which would lead to the dirent data being unref'ed and that *also* could garbage collected, before one of the luv_push_dirent calls that use the dirent data (i.e. a possible use-after-free). Seems very unlikely in real-world usage, but 100% reproducible with a maximally aggressive/stop-the-world GC.1 parent bcb0f40 commit af434d1
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | 377 | | |
381 | 378 | | |
382 | 379 | | |
| |||
388 | 385 | | |
389 | 386 | | |
390 | 387 | | |
| 388 | + | |
| 389 | + | |
391 | 390 | | |
392 | 391 | | |
393 | 392 | | |
| |||
0 commit comments