Created
August 18, 2015 10:24
-
-
Save kayceesrk/21bb37b4e7cf92e7ca54 to your computer and use it in GitHub Desktop.
Trigger read fault deadlock.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let r1 : int list ref = ref [1024] | |
let r2 : int list ref = ref [1024] | |
let rec foo lr fr = function | |
| 0 -> foo lr fr 1024 | |
| i -> | |
let v = Random.int i in | |
lr := [v]; | |
foo lr fr @@ List.hd(!fr) | |
let () = Domain.spawn (fun () -> foo r1 r2 1024) | |
let () = foo r2 r1 1024 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment