Bug#526442: Can't use thread at all with perl4caml
This new program, also ending with a segfault, shows that the problem is
not related to the use of the same instance of the mech object.
-------------------- main.ml --------------------
let mech = Pl_WWW_Mechanize.new_ ()
let m = Mutex.create ()
let evil_thread () =
Mutex.lock m;
let _ = Pl_HTML_TreeBuilder.new_from_content "<html></html>" in
Mutex.unlock m
let _ =
Mutex.lock m;
mech#agent_alias "Linux Mozilla";
mech#get "http://www.gnu.org";
Mutex.unlock m;
let _ = Thread.create evil_thread () in
Mutex.lock m;
print_string mech#content;
Mutex.unlock m
Reply to: