Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] more bigarray problems
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Fernando Alegre <fernando@c...>
Subject: [Caml-list] more bigarray problems

After I thought we had tamed bigarrays, it seems we did not. Certain
operations such as slices and reshaping allocate new bigarray structs. They
use the stock bigarray_alloc instead of the custom one, of course, and so
they bypass the finalizers. We managed to make OCaml segfault for this!

I don't see any way to work around that problem other than having support for
external finalizers in bigarray_alloc, and having proxies and slices
remember them. Even with a perfectly working Gc.finalise, we would encounter
the same problem, as the finalizers will get forgotten after a reshape, not
a very nice feature...

I think, given this input, lack of finalization support in bigarrays should be
promoted from just a feature wish to a bug, since there seems to be no way
to work around it.

Thanks,
       Fernando

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners