Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005306OCaml~DO NOT USE (was: OCaml general)public2011-06-29 14:392012-09-25 20:07
Assigned Toxleroy 
PlatformOSOS Version
Product Version3.12.0 
Target VersionFixed in Version3.12.1+dev 
Summary0005306: Comparing to Thread.self() raises exception at runtime
DescriptionSince 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 InformationThis is not a big deal, since I can use to perform my comparison. I was mostly worried that this wasn't documented in the release changelog.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
gasche (administrator)
2011-12-13 01:02

I could trace the change of behavior back to the following source change in release/3.12.0: [^]
the systhreads/ function moved from "posix.c" to "st_stubs.c".

In posix.c there was: [^]

  static struct custom_operations caml_threadstatus_ops = {

while in st_stubs.c we now have: [^]

  static struct custom_operations caml_threadstatus_ops = {

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.
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
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker