I am a little bit puzzled by the reference manual concerning the handling of OCaml strings in C stubs (§ 18.11.2) :
/* Copy the string argument to a C string, allocated outside the
OCaml heap. */
name = caml_stat_alloc(caml_string_length(vname) + 1);
name = caml_strdup(String_val(vname));
No. If you follow the definition you’ll see that it ends up with a memcpy. Recent compilers allow to check if the string is C safe with this function in mlvalues.h.