forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a GC bug in local stack scanning (ocaml-flambda#17)
The stack pointer was computed relative to the wrong local arena
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(* TEST | ||
flags += "-extension local" | ||
* native *) | ||
|
||
type n = Z | S of n | ||
|
||
let rec gen_locals (local_ n) depth _ = local_ | ||
if depth = 0 | ||
then | ||
S n | ||
else | ||
let s = S n in | ||
let m = gen_locals s (depth - 1) (ref 42) in | ||
let _ = gen_locals m (depth - 1) (ref 42) in | ||
S n | ||
|
||
let () = | ||
match gen_locals Z 21 (ref 42) with | ||
| S Z -> print_endline "ok" | ||
| _ -> assert false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ok |