We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb56f26 commit d721134Copy full SHA for d721134
ocaml/runtime/memory.c
@@ -358,8 +358,11 @@ CAMLexport int caml_is_stack (value v)
358
CAMLexport void caml_modify_local (value obj, intnat i, value val)
359
{
360
if (Color_hd(Hd_val(obj)) == NOT_MARKABLE) {
361
- /* This function should not be used on external values */
362
- CAMLassert(caml_is_stack(obj));
+ /* This function should not be used on external values, but we have seen
+ some cases where it has been, in safe contexts where only immediate
363
+ values are involved. */
364
+ CAMLassert(caml_is_stack(obj)
365
+ || (!Is_block(val) && !Is_block(Field(obj, i))));
366
Field(obj, i) = val;
367
} else {
368
caml_modify(&Field(obj, i), val);
0 commit comments