Comments (4)
This is very likely to be an issue to fix in the program/library, rather than an issue to fix in the OCaml distribution. Please open an issue there.
It looks like the GC is encountered a value that is malformed -- it should be a block but accessing its header segfaults.
There are several ways this could happen, but one possibility would be that some FFI code uses "naked pointers" (OCaml values that are raw pointers to non-OCaml values outside the OCaml heap), which used to accepted for OCaml 4, were deprecated in OCaml 4.11 (2020), and are now illegal in OCaml 5. One would need to look at the FFI code to tell if it is using naked pointers to rule this possibility out. See the reference manual on this topic.
from ocaml.
Here is an example of naked pointer in the odiff code for reading tiff
files: https://github.com/dmtrKovalenko/odiff/blob/c79541749f0debaf34b698e592dce6da9fb87e9d/io/tiff/ReadTiff.c#L52 . This is most likely the source of the illegal naked pointer in the test.
from ocaml.
There you go:
I think that you could change the code (also in ReadPng) to use a "managed" bigarray where the memory is malloced by the OCaml runtime when creating the bigarray, and deallocated when it gets collected. Alternatively, you can just set the last bit of the pointer when storing it as an OCaml value, this is the "valid representation as an OCaml tagged integer" approach mentioned last in the reference manual.
from ocaml.
Oh I see, thank for explanation :)
from ocaml.
Related Issues (20)
- `value_kind` classification for `function` cases only looks at first case HOT 2
- Ground coercion is not composable HOT 1
- Regression with default GC settings between `4.14.2` and `5.1.1` HOT 7
- Doc typo in `Printexc` HOT 2
- Restore native armv7 support for NetBSD 10.0 HOT 7
- Missing warning when an attribute is ignored or makes no sense HOT 9
- Support parameter constraints in module signature type equalities HOT 5
- Update the effect handlers manual page to use syntax HOT 3
- Simplify effect handler closure and reperform by dropping the `last_fiber` argument
- Module type substitutions in signature of recursive modules are not checked for cyclicity
- Sub-module identities inside an applicative functor are actually generative, leading to invalid signatures
- Strange error message with trunk HOT 5
- "β t is less general than ∀α. α t" with trunk HOT 14
- Please provide guidance whether the static linking exception applies to distributions like DkML HOT 12
- Semantics of toplevel let-bindings in classes HOT 12
- Make extensible variants more efficient and mashalable. HOT 4
- Library archive name change in OCaml 5 (e.g libunix.a -> libunixbyt.a & libunixnat.a) HOT 3
- Type-level module alias for functor parameter accepted HOT 1
- Signal handler doesn't run if signal received at the wrong time HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocaml.