Closed jamesjer closed 3 years ago
Can you also send your patch there also: https://github.com/UnixJunkie/bytearray bytearray was factored out of parmap, for reuse by other libraries
Thanks a lot, @jamesjer, for identifying this issue, that was in #92 too. It would be interesting to know exactly what changed in recent versions of the OCaml compiler that led to this behaviour, but that's not a blocker for moving forward. I do not mind dropping support for OCaml 4.02.3. I'm merging this and will make a new release soon.
New release 1.2.1 done (and published to opam-repository). Thanks again @jamesjer
I am working on packaging parmap for the Fedora Linux distribution. An initial build attempt failed on the 32-bit builders, as noted in https://github.com/rdicosmo/parmap/issues/92. Retrying with one zero removed from 10000000 in both
floatscale.ml
andsimplescale.ml
caused the simplescale test to succeed, but the floatscale test segfaulted, as also noted in https://github.com/rdicosmo/parmap/issues/92.A run of the floatscale test under valgrind shows that an out-of-bounds array access is the cause:
The memory block is allocated inside of
GC_compact()
, suggesting that something was moved, but the code has a pointer that was not updated. The pointer that is accessed is created in bytearray.ml, here:With the change in this patch, using
Array.create_float
instead ofObj
, the segfaults no longer occur. Unfortunately, that means dropping support for OCaml 4.02.3.