Skip to content

Thread-unsafety in caml_make_float_vect #11504

@gadmm

Description

@gadmm

The static initialization code below appears to be thread-unsafe in the presence of multiple domains:

ocaml/runtime/array.c

Lines 255 to 259 in 712ee62

static value uninitialized_float = Val_unit;
if (uninitialized_float == Val_unit){
uninitialized_float = caml_alloc_shr (Double_wosize, Double_tag);
caml_register_generational_global_root (&uninitialized_float);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions