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: 4497 Reporter: till Assigned to:@garrigue Status: closed (set by @xavierleroy on 2010-04-29T12:25:59Z) Resolution: fixed Priority: normal Severity: crash Version: 3.10.1 Fixed in version: 3.10.1 Category: ~DO NOT USE (was: OCaml general)
Bug description
The type checker accepts exception definitions like:
exception PolVar of [>]
which can be used to redefine Obj.magic like functions:
let mag i = try
raise (PolVar (R i)) with PolVar (R i) -> i
After trying is out a little more thoroughly (which I should have done before submitting the bug) it turns out that, if I do not provide the mli file I get:
The implementation polcrash.ml
does not match the interface (inferred signature):
Exception declarations do not match:
exception PolVar of [> ]
is not included in
exception PolVar of [> ]
This compilation error can be subverted using a blank interface.
So currently the attached file will segfault ocaml but not compile. Providing an empty interface will get it to compile.
Original bug ID: 4497
Reporter: till
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2010-04-29T12:25:59Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 3.10.1
Fixed in version: 3.10.1
Category: ~DO NOT USE (was: OCaml general)
Bug description
The type checker accepts exception definitions like:
exception PolVar of [>]
which can be used to redefine Obj.magic like functions:
let mag i = try
raise (PolVar (
R i)) with PolVar (
R i) -> ileading to potential segFaults:
let () = print_string (mag 0)
Additional information
`
File attachments
The text was updated successfully, but these errors were encountered: