| Anonymous | Login | Signup for a new account | 2013-06-18 07:18 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 | |||
| 0005306 | OCaml | OCaml general | public | 2011-06-29 14:39 | 2012-09-25 20:07 | |||
| Reporter | sigonnea | |||||||
| Assigned To | xleroy | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.0 | |||||||
| Target Version | Fixed in Version | 3.12.1+dev | ||||||
| Summary | 0005306: Comparing to Thread.self() raises exception at runtime | |||||||
| Description | Since Ocaml 3.12.0, when comparing Thread.self() to something, the following exception is raised : Invalid_argument "equal: abstract value" How to reproduce: execute Thread.self () = Thread.self ();; in the toplevel. This returns "- : bool = true" with ocaml <= 3.11.2 and raises the mentionned execption with ocaml 3.12.0 This is a problem since: - code compiles but the exception is raised at runtime - I haven't seen about this in the detailed changelog for Ocaml 3.12.0 | |||||||
| Additional Information | This is not a big deal, since I can use Thread.id to perform my comparison. I was mostly worried that this wasn't documented in the release changelog. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0006255) gasche (developer) 2011-12-13 01:02 |
I could trace the change of behavior back to the following source change in release/3.12.0: http://caml.inria.fr/cgi-bin/viewvc.cgi?view=revision&revision=10220 [^] the systhreads/ function moved from "posix.c" to "st_stubs.c". In posix.c there was: http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/branches/newsysthreads/otherlibs/systhreads/posix.c?view=markup&pathrev=10219 [^] static struct custom_operations caml_threadstatus_ops = { "_threadstatus", caml_threadstatus_finalize, caml_mutex_condition_compare, custom_hash_default, custom_serialize_default, custom_deserialize_default }; while in st_stubs.c we now have: http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/branches/newsysthreads/otherlibs/systhreads/st_stubs.c?view=markup&pathrev=10220 [^] static struct custom_operations caml_threadstatus_ops = { "_threadstatus", caml_threadstatus_finalize, custom_compare_default, custom_hash_default, custom_serialize_default, custom_deserialize_default }; The custom comparison operation changed from `caml_{mutex_}condition_compare` to `custom_compare_default`, which fails on comparison with the observed error: "equal: abstract value". I have no idea whether the change was deliberate or by mistake. We'll have to wait for confirmation on this. |
|
(0006264) xleroy (administrator) 2011-12-13 16:21 |
Thanks for the detective work. Pre-3.12 behavior restored in 3.12 bugfix branch (commit 11302) and in trunk (commit 11303). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-06-29 14:39 | sigonnea | New Issue | |
| 2011-12-13 01:02 | gasche | Note Added: 0006255 | |
| 2011-12-13 01:04 | gasche | Assigned To | => xleroy |
| 2011-12-13 01:04 | gasche | Status | new => assigned |
| 2011-12-13 16:21 | xleroy | Note Added: 0006264 | |
| 2011-12-13 16:21 | xleroy | Status | assigned => resolved |
| 2011-12-13 16:21 | xleroy | Resolution | open => fixed |
| 2011-12-13 16:21 | xleroy | Fixed in Version | => 3.12.1+dev |
| 2012-09-25 20:07 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |