| Anonymous | Login | Signup for a new account | 2013-06-20 09:41 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 | |||
| 0004821 | OCaml | OCaml general | public | 2009-06-12 14:14 | 2009-06-12 14:43 | |||
| Reporter | frisch | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | crash | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | 3.11.1+dev | ||||||
| Summary | 0004821: Bad compilation of classes yields segfault | |||||||
| Description | Consider this piece of code: ====================================================== class c = object(this) method m = ignore (this :> < m: unit; m: unit >) end let () = (new c) # m ====================================================== The call to the method yields a segfault (or something similar). The code generator produces a call to CamlinternalOo.make_class with an array of method being [| "m"; "m" |]. The explicit coercion should probably be rejected (and it is indeed rejected if we use an immediate object rather than a class). Or maybe the type expression (with a duplicated method name) itself should be rejected? | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004992) frisch (developer) 2009-06-12 14:19 |
The problem is probably in the type checker. The signature inferred for the class is: class c : object method m : unit method m : unit end |
|
(0004993) garrigue (manager) 2009-06-12 14:43 |
Fixed in CVS branch 3.11: there was no check at all that the same method name was not used twice! Unfortunately, it looks like this is a few hours late for makinf it into 3.11.1. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-06-12 14:14 | frisch | New Issue | |
| 2009-06-12 14:19 | frisch | Note Added: 0004992 | |
| 2009-06-12 14:43 | garrigue | Note Added: 0004993 | |
| 2009-06-12 14:43 | garrigue | Status | new => closed |
| 2009-06-12 14:43 | garrigue | Resolution | open => fixed |
| 2009-06-12 14:43 | garrigue | Fixed in Version | => 3.11.1+dev |
| Copyright © 2000 - 2011 MantisBT Group |