Skip to content

Commit 231660d

Browse files
committed
Always conservatively scan tasks without considering task.start
1 parent aa84850 commit 231660d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mmtk/src/scanning.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ impl Scanning<JuliaVM> for VMScanning {
8484
pthread
8585
);
8686
// Conservative scan stack and registers. If the task hasn't been started, we do not need to scan its stack and registers.
87-
if unsafe { (*task).start == crate::jl_true } {
87+
// We cannot use `task->start` to skip conservative scanning, as before a task is started, the runtime may evaluate the code and we need to make sure the runtime objects are properly scanned.
88+
// However, without this check, we may timeout in a test that spawns a lot of tasks.
89+
// if unsafe { (*task).start == crate::jl_true } {
8890
crate::conservative::mmtk_conservative_scan_task_stack(task);
8991
crate::conservative::mmtk_conservative_scan_task_registers(task);
90-
}
92+
// }
9193

9294
if task_is_root {
9395
// captures wrong root nodes before creating the work

0 commit comments

Comments
 (0)