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: 7915 Reporter: danielrichman Status: new Resolution: open Priority: normal Severity: minor Platform: Unix Version: 4.07.0 Category: otherlibs Monitored by:@nojb@diml
Bug description
caml_ba_slice uses caml_ba_alloc and hence caml_ba_ops/caml_ba_finalize, even if the array you are slicing is mmapped and so it should be using caml_ba_mapped_ops/caml_ba_mapped_finalize.
When the slice is garbage collected, caml_ba_finalize either asserts-0, or does nothing (if assertions are not enabled), and in particular does not decrease the refcount on the proxy.
When the original array is garbage collected, the refcount is greater than 1, so it is not freed.
Original bug ID: 7915
Reporter: danielrichman
Status: new
Resolution: open
Priority: normal
Severity: minor
Platform: Unix
Version: 4.07.0
Category: otherlibs
Monitored by: @nojb @diml
Bug description
caml_ba_slice uses caml_ba_alloc and hence caml_ba_ops/caml_ba_finalize, even if the array you are slicing is mmapped and so it should be using caml_ba_mapped_ops/caml_ba_mapped_finalize.
When the slice is garbage collected, caml_ba_finalize either asserts-0, or does nothing (if assertions are not enabled), and in particular does not decrease the refcount on the proxy.
When the original array is garbage collected, the refcount is greater than 1, so it is not freed.
Steps to reproduce
Build and execute attached file with ocamlopt.
File attachments
The text was updated successfully, but these errors were encountered: