Skip to content

Commit

Permalink
flambda-backend: Fix assertion in caml_ephe_clean (#2192)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell authored Dec 22, 2023
1 parent 4d155c6 commit 502c69d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions runtime/caml/shared_heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Caml_inline int is_marked(value v) {
return Has_status_val(v, caml_global_heap_state.MARKED);
}

Caml_inline int is_not_markable(value v) {
return Has_status_val(v, NOT_MARKABLE);
}

void caml_redarken_pool(struct pool*, scanning_action, void*);

intnat caml_sweep(struct caml_heap_state*, intnat);
Expand Down
5 changes: 3 additions & 2 deletions runtime/weak.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ void caml_ephe_clean (value v) {
else if (Is_block (child) && !Is_young (child)) {
if (Tag_val (child) == Infix_tag) child -= Infix_offset_val (child);
/* If we scanned all the keys and the data field remains filled,
then the mark phase must have marked it */
CAMLassert( is_marked (child) );
then the mark phase must have marked it (or alternatively the
value concerned is in static data etc). */
CAMLassert( is_marked (child) || is_not_markable (child) );
}
#endif
}
Expand Down

0 comments on commit 502c69d

Please sign in to comment.