Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialized bigarrays do not preserve sharing #3986

Closed
vicuna opened this issue Mar 9, 2006 · 1 comment
Closed

Serialized bigarrays do not preserve sharing #3986

vicuna opened this issue Mar 9, 2006 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Mar 9, 2006

Original bug ID: 3986
Reporter: @mmottl
Status: resolved (set by @xavierleroy on 2012-08-02T06:51:40Z)
Resolution: suspended
Priority: normal
Severity: feature
Version: 3.09.1
Category: otherlibs
Monitored by: @mmottl

Bug description

Even when marshalling functions are called with sharing of data allowed, bigarrays that share data due to "slice" and "sub" are not reconstructed in a semantically equivalent way. It's surely not that easy to efficiently implement extraction and reconstruction of the exact shared data ranges used by some bigarrays without including superfluous data. The "quick" solution of just including the whole initial data would, however, still be better than not have any sharing at all, which may lead to subtle bugs.

I have attached a file that demonstrates the problem. It prints "2 42 42 42" but should print "2 42 42 2".

File attachments

@vicuna
Copy link
Author

vicuna commented Aug 2, 2012

Comment author: @xavierleroy

Six years later, we still don't have any answer to this feature wish: preserving this sharing would require either major changes to the marshaller (so that custom marshallers have somehow access to the re-sharing machinery) or reimplementing Bigarrays so that proxies are represented by OCaml data structures. Plus, there would be a potential problem with a large bigarray being marshalled in full while all the user asked was to marshal a small subarray. I'm "suspending" this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant