-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Tail-call optimisation not working properly on s390x machines #10857
Comments
Right, that's an old limitation of the OCaml native-code compiler: tail calls with too many arguments are turned into regular calls. "Too many" depends on the target processor, but is quite low for s390x, so this may be a reason why you saw the problem on s390x first. At any rate, this limitation was lifted in the working sources, see #10595. So, everything should work fine in the next release of OCaml. version 4.14. |
…irmin-pack, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-layers, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-chunk and irmin-bench (2.10.0) CHANGES: ### Fixed - *irmin* - Conversion between proofs and trees are now done in CPS (mirage/irmin#1624, @samoht) - Better support for s390x to workaround ocaml/ocaml#10857 (mirage/irmin#1694, @icristescu) - *irmin-pack* - Fix proofs for large inodes by tracking side-effects reads inside the inode implementation (mirage/irmin#1670, @samoht, @Ngoguey42) - Flush branch store without calling `Repo.close` (mirage/irmin#1707, @zshipko) ### Added - **irmin** - Add `Tree.produce_proof` and `Tree.verify_proof` to produce and verify proofs from complex computations. `produce_proof` and `verify_proof` takes a callback over tree and instead of a static list of operations -- this now means that the full `Tree` API can now be used in proofs, including sub-tree operations, folds and paginated lists (mirage/irmin#1625, mirage/irmin#1663, mirage/irmin#1683, @samoht, @Ngoguey42) - Add `Tree.produce_stream` and `Tree.verify_stream` to produce and verify stream proofs (mirage/irmin#1684, mirage/irmin#1692, mirage/irmin#1691, @samoht, @Ngoguey42, @icristescu) - **irmin-pack** - Verify inode depth invariants (mirage/irmin#1665, @samoht) - **irmin-unix** - Add `tezos` store type for `irmin` command-line (mirage/irmin#1678, @zshipko) ### Changed - **irmin** - Remove `Tree.Proof.of_keys`. Use `Tree.produce_proof` instead (mirage/irmin#1625, @samoht) - `Tree.empty` now takes a unit argument. (mirage/irmin#1566, @craigfe) - `Tree.length` now takes a tree as argument (mirage/irmin#1676, @samoht) - `Tree.Proof.t` now uses a more precise datatype to encode value invariants (mirage/irmin#1688, @samoht) - **irmin-pack** - irmin-pack: add an option to configure the index function and pick the relevant bits in cryptographic a hash by default (mirage/irmin#1677, @samoht) - **irmin-git** - Require at least `git.3.7.0` in the codebase (mirage/irmin#1637, @dinosaure)
…irmin-pack, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-layers, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-chunk and irmin-bench (2.10.0) CHANGES: - *irmin* - Conversion between proofs and trees are now done in CPS (mirage/irmin#1624, @samoht) - Better support for s390x to workaround ocaml/ocaml#10857 (mirage/irmin#1694, @icristescu) - *irmin-pack* - Fix proofs for large inodes by tracking side-effects reads inside the inode implementation (mirage/irmin#1670, @samoht, @Ngoguey42) - Flush branch store without calling `Repo.close` (mirage/irmin#1707, @zshipko) - **irmin** - Add `Tree.produce_proof` and `Tree.verify_proof` to produce and verify proofs from complex computations. `produce_proof` and `verify_proof` takes a callback over tree and instead of a static list of operations -- this now means that the full `Tree` API can now be used in proofs, including sub-tree operations, folds and paginated lists (mirage/irmin#1625, mirage/irmin#1663, mirage/irmin#1683, @samoht, @Ngoguey42) - Add `Tree.produce_stream` and `Tree.verify_stream` to produce and verify stream proofs (mirage/irmin#1684, mirage/irmin#1692, mirage/irmin#1691, @samoht, @Ngoguey42, @icristescu) - **irmin-pack** - Verify inode depth invariants (mirage/irmin#1665, @samoht) - **irmin-unix** - Add `tezos` store type for `irmin` command-line (mirage/irmin#1678, @zshipko) - **irmin** - Remove `Tree.Proof.of_keys`. Use `Tree.produce_proof` instead (mirage/irmin#1625, @samoht) - `Tree.empty` now takes a unit argument. (mirage/irmin#1566, @craigfe) - `Tree.length` now takes a tree as argument (mirage/irmin#1676, @samoht) - `Tree.Proof.t` now uses a more precise datatype to encode value invariants (mirage/irmin#1688, @samoht) - **irmin-pack** - irmin-pack: add an option to configure the index function and pick the relevant bits in cryptographic a hash by default (mirage/irmin#1677, @samoht) - **irmin-git** - Require at least `git.3.7.0` in the codebase (mirage/irmin#1637, @dinosaure)
Thank you for the response. I run my example with ocaml#trunk and indeed it works (constant stack size and no seg fault). |
…irmin-pack, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-layers, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-chunk and irmin-bench (2.9.1) CHANGES: ### Fixed - **irmin** - Better support for s390x to workaround ocaml/ocaml#10857 (mirage/irmin#1694, @icristescu)
…irmin-pack, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-layers, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-chunk and irmin-bench (2.9.1) CHANGES: - **irmin** - Better support for s390x to workaround ocaml/ocaml#10857 (mirage/irmin#1694, @icristescu)
…irmin-pack, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-layers, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-chunk and irmin-bench (2.9.1) CHANGES: - **irmin** - Better support for s390x to workaround ocaml/ocaml#10857 (mirage/irmin#1694, @icristescu)
…irmin-pack, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-layers, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-chunk and irmin-bench (2.9.1) CHANGES: - **irmin** - Better support for s390x to workaround ocaml/ocaml#10857 (mirage/irmin#1694, @icristescu)
The following code crashes with
Segmentation fault
on s390x machines, which is actually a stack overflow issue. The code below prints the size of the stack during a traversal of a very large map. The stack size is normally constant, but on an s309x machine, the stack is gradually growing until it raises the segmentation fault error.The text was updated successfully, but these errors were encountered: