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: 156 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
The following program crashes:
let _ =let a =Array.init 100 (fun_ -> Random.float1.0) inlet l =Array.to_list a inlet l =List.sort compare l in()Fatal error: uncaught exceptionInvalid_argument("Array.get")
It must be a bug in List.sort, because with Array.sort this works fine.
I may add a request, as has been discussed in the list recently, to add
an optional feature that shows where the exception was thrown. This
(new) bug has occured in a 100,000 lines of code system (Ensemble). It is
difficult to find a bug in such a large system without language level
help.
Thanks,
Ohad.
The text was updated successfully, but these errors were encountered:
It must be a bug in List.sort, because with Array.sort this works fine.
This is a bug in Obj.truncate, which makes List.sort fail on all lists
of floats (except the empty list), but only on 32-bit machines. Many
thanks for finding and reporting the bug. I'm including a patch at the
end of this mail.
Original bug ID: 156
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
The following program crashes:
It must be a bug in List.sort, because with Array.sort this works fine.
I may add a request, as has been discussed in the list recently, to add
an optional feature that shows where the exception was thrown. This
(new) bug has occured in a 100,000 lines of code system (Ensemble). It is
difficult to find a bug in such a large system without language level
help.
Thanks,
Ohad.
The text was updated successfully, but these errors were encountered: