File: reachable_words_bug.ml

package info (click to toggle)
js-of-ocaml 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (8 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
(* TEST *)

let _ =
  (* In 4.13 this causes Obj.reachable_words to segfault
     because of a missing initialization in caml_obj_reachable_words *)
  ignore (Marshal.(to_string 123 [No_sharing]));
  let n = Obj.reachable_words (Obj.repr (Array.init 10 (fun i -> i))) in
  assert (n = 11)