Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assertion in caml_ephe_clean #2192

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ocaml/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 ocaml/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
Loading