You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 432 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Manuel Fahndrich
Version: 3.01
OS: win2000, x86
Submission from: tide79.microsoft.com (131.107.3.79)
The following code causes the byte code interpreter to crash when run. The
optimizing compiler works fine.
-Maf
type defid = string * int
type t = A of string | B of defid
let trans a b c =
match a,b,c with
| B (name,i), None, `CGuard
| B (name,i), Some ("guard",_), _ ->
Printf.printf "crashing...\n"; flush stdout;
Printf.printf "guard case(%s,%d)\n" name i
| _, _, _ ->
Printf.printf "default case\n"
(* These cases are okay
*)
let _ = trans (A "foo") None `CGuard
let _ = trans (A "foo") None `CRsrc
let _ = trans (B ("baz",22)) None `CRsrc
let _ = trans (A "foo") (Some ("key",1)) `CRsrc
let _ = trans (A "foo") (Some ("guard",2)) `CRsrc
let _ = trans (A "foo") (Some ("cap",3)) `CRsrc
let _ = trans (A "foo") (Some ("key",4)) `CGuard
let _ = trans (A "foo") (Some ("guard",5)) `CGuard
let _ = trans (A "foo") (Some ("cap",6)) `CGuard
let _ = trans (B ("goo",123)) (Some ("key",1)) `CRsrc
let _ = trans (B ("goo",123)) (Some ("cap",3)) `CRsrc
let _ = trans (B ("goo",123)) (Some ("key",4)) `CGuard
let _ = trans (B ("goo",123)) (Some ("cap",6)) `CGuard
(* These cases crash the byte code compiler, but not the optimizing compiler
under x86, ocaml 3.01
*)
let _ = trans (B ("baz",11)) None `CGuard
let _ = trans (B ("goo",123)) (Some ("guard",2)) `CRsrc
let _ = trans (B ("goo",123)) (Some ("guard",5)) `CGuard
The text was updated successfully, but these errors were encountered:
Original bug ID: 432
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Manuel Fahndrich
Version: 3.01
OS: win2000, x86
Submission from: tide79.microsoft.com (131.107.3.79)
The following code causes the byte code interpreter to crash when run. The
optimizing compiler works fine.
-Maf
type defid = string * int
type t = A of string | B of defid
let trans a b c =
match a,b,c with
| B (name,i), None, `CGuard
| B (name,i), Some ("guard",_), _ ->
| _, _, _ ->
(* These cases are okay
*)
let _ = trans (A "foo") None `CGuard
let _ = trans (A "foo") None `CRsrc
let _ = trans (B ("baz",22)) None `CRsrc
let _ = trans (A "foo") (Some ("key",1)) `CRsrc
let _ = trans (A "foo") (Some ("guard",2)) `CRsrc
let _ = trans (A "foo") (Some ("cap",3)) `CRsrc
let _ = trans (A "foo") (Some ("key",4)) `CGuard
let _ = trans (A "foo") (Some ("guard",5)) `CGuard
let _ = trans (A "foo") (Some ("cap",6)) `CGuard
let _ = trans (B ("goo",123)) (Some ("key",1)) `CRsrc
let _ = trans (B ("goo",123)) (Some ("cap",3)) `CRsrc
let _ = trans (B ("goo",123)) (Some ("key",4)) `CGuard
let _ = trans (B ("goo",123)) (Some ("cap",6)) `CGuard
(* These cases crash the byte code compiler, but not the optimizing compiler
*)
let _ = trans (B ("baz",11)) None `CGuard
let _ = trans (B ("goo",123)) (Some ("guard",2)) `CRsrc
let _ = trans (B ("goo",123)) (Some ("guard",5)) `CGuard
The text was updated successfully, but these errors were encountered: