Skip to content

Commit 61a7b47

Browse files
authored
flambda-backend: Insert missing page table check in roots_nat.c (#541)
1 parent 323bd36 commit 61a7b47

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

runtime/roots_nat.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,16 @@ static int visit(scanning_action maj, scanning_action min,
439439
if (!Is_block(v))
440440
return 0;
441441

442+
if (Is_young(v)) {
443+
if (min != NULL) min(v, p);
444+
return 0;
445+
}
446+
447+
if (!Is_in_value_area(v))
448+
return 0;
449+
450+
/* Either major or local, distinguish by header color */
451+
442452
hd = Hd_val(vblock);
443453
/* Compaction can create things that look like Infix_tag,
444454
but have color Caml_gray (cf. eptr in compact.c).
@@ -451,11 +461,6 @@ static int visit(scanning_action maj, scanning_action min,
451461
if (Color_hd(hd) == Caml_black)
452462
return 0;
453463

454-
if (Is_young(vblock)) {
455-
if (min != NULL) min(v, p);
456-
return 0;
457-
}
458-
459464
if (Color_hd(hd) == Local_unmarked) {
460465
Hd_val(vblock) = With_color_hd(hd, Local_marked);
461466
return 1;

0 commit comments

Comments
 (0)