| Anonymous | Login | Signup for a new account | 2013-06-20 00:10 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004497 | OCaml | OCaml general | public | 2008-02-04 09:55 | 2010-04-29 14:25 | |||
| Reporter | till | |||||||
| Assigned To | garrigue | |||||||
| Priority | normal | Severity | crash | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.10.1 | |||||||
| Target Version | Fixed in Version | 3.10.1 | ||||||
| Summary | 0004497: exception declaration of unclosed polymorphic variant type are not rejected by the typechecker. | |||||||
| 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 leading to potential segFaults: let () = print_string (mag 0) | |||||||
| Additional Information | ` | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004443) garrigue (manager) 2008-02-04 10:11 |
I cannot reproduce here with 3.10.1. Are you sure about the version? This bug was fixed a long time ago (it is already corrected in 3.09.3) Note that there is a similar bug with objects in 3.10.1, but is already fixed in CVS too. |
|
(0004444) till (reporter) 2008-02-04 10:53 edited on: 2008-02-04 10:54 |
My ocaml version is: 3.10.1+dev0 (2007-05-21) 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. HTH |
|
(0004445) garrigue (manager) 2008-02-04 14:28 |
Already fixed in 3.10.1. This was originally reported by Zheng Li on the caml-list (2007-11-09). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2008-02-04 09:55 | till | New Issue | |
| 2008-02-04 10:11 | garrigue | Note Added: 0004443 | |
| 2008-02-04 10:53 | till | Note Added: 0004444 | |
| 2008-02-04 10:54 | till | Note Edited: 0004444 | |
| 2008-02-04 10:54 | till | File Added: polcrash.ml | |
| 2008-02-04 14:28 | garrigue | Status | new => resolved |
| 2008-02-04 14:28 | garrigue | Fixed in Version | => 3.10.1 |
| 2008-02-04 14:28 | garrigue | Resolution | open => fixed |
| 2008-02-04 14:28 | garrigue | Assigned To | => garrigue |
| 2008-02-04 14:28 | garrigue | Note Added: 0004445 | |
| 2010-04-29 14:25 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |