It was definitely unsafe, and was in fact part of the motivations to let caml_state be NULL when the domain lock is not held and to add Caml_state_opt to let users check for this.
It was definitely unsafe, and was in fact part of the motivations to let caml_state be NULL when the domain lock is not held and to add Caml_state_opt to let users check for this.