Skip to content

Commit

Permalink
Add comment that causes segfault and opam lock
Browse files Browse the repository at this point in the history
When this project is built with `dune build` (with the switch specified
in the opam lock file installed), it results the following segfault:

    ocamlopt lib/abt.cmxs (exit 2)
(cd _build/default && <snip>/.opam/4.12.0/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -shared -linkall -I lib -o lib/abt.cmxs lib/abt.cmxa)
Fatal error: exception End_of_file
    ocamlopt test/test.exe (exit 2)
(cd _build/default && <snip>/.opam/4.12.0/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o test/test.exe <snip>/um-abt/_opam/lib/base/base_internalhash_types/base_internalhash_types.cmxa -I <snip>/um-abt/_opam/lib/base/base_internalhash_types <snip>/um-abt/_opam/lib/base/caml/caml.cmxa <snip>/um-abt/_opam/lib/sexplib0/sexplib0.cmxa <snip>/um-abt/_opam/lib/base/shadow_stdlib/shadow_stdlib.cmxa <snip>/um-abt/_opam/lib/base/base.cmxa -I <snip>/um-abt/_opam/lib/base <snip>/um-abt/_opam/lib/ppx_inline_test/config/inline_test_config.cmxa <snip>/um-abt/_opam/lib/jane-street-headers/jane_street_headers.cmxa <snip>/um-abt/_opam/lib/ppx_sexp_conv/runtime-lib/ppx_sexp_conv_lib.cmxa <snip>/um-abt/_opam/lib/ppx_compare/runtime-lib/ppx_compare_lib.cmxa <snip>/um-abt/_opam/lib/ppx_enumerate/runtime-lib/ppx_enumerate_lib.cmxa <snip>/um-abt/_opam/lib/ppx_hash/runtime-lib/ppx_hash_lib.cmxa <snip>/um-abt/_opam/lib/time_now/time_now.cmxa -I <snip>/um-abt/_opam/lib/time_now <snip>/um-abt/_opam/lib/ppx_inline_test/runtime-lib/ppx_inline_test_lib.cmxa <snip>/um-abt/_opam/lib/ppx_here/runtime-lib/ppx_here_lib.cmxa <snip>/um-abt/_opam/lib/ppx_expect/common/expect_test_common.cmxa <snip>/um-abt/_opam/lib/ppx_expect/config_types/expect_test_config_types.cmxa <snip>/um-abt/_opam/lib/ppx_expect/collector/expect_test_collector.cmxa -I <snip>/um-abt/_opam/lib/ppx_expect/collector <snip>/um-abt/_opam/lib/ppx_expect/config/expect_test_config.cmxa lib/abt.cmxa <snip>/.opam/4.12.0/lib/ocaml/unix.cmxa -I <snip>/.opam/4.12.0/lib/ocaml <snip>/um-abt/_opam/lib/qcheck-core/qcheck_core.cmxa <snip>/um-abt/_opam/lib/qcheck-core/runner/qcheck_runner.cmxa <snip>/um-abt/_opam/lib/stdlib-shims/stdlib_shims.cmxa <snip>/um-abt/_opam/lib/ounit2/advanced/oUnitAdvanced.cmxa <snip>/um-abt/_opam/lib/ounit2/oUnit.cmxa <snip>/um-abt/_opam/lib/qcheck-ounit/qcheck_ounit.cmxa <snip>/um-abt/_opam/lib/qcheck/qcheck.cmxa <snip>/um-abt/_opam/lib/result/result.cmxa <snip>/um-abt/_opam/lib/ppx_deriving/runtime/ppx_deriving_runtime.cmxa test/example/example.cmxa test/.test.eobjs/native/dune__exe.cmx test/.test.eobjs/native/dune__exe__Abt_gen.cmx test/.test.eobjs/native/dune__exe__Test.cmx)
Fatal error: exception End_of_file
  • Loading branch information
shonfeder committed Aug 2, 2021
1 parent 6d76801 commit b047543
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/abt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,6 @@ module Make (O : Operator) = struct
free Var.Set.empty t

let is_closed : t -> bool = fun t -> Var.Set.is_empty (free_vars t)

(* let unify : t -> t -> t * *)
end
38 changes: 38 additions & 0 deletions um-abt.opam.locked
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
opam-version: "2.0"
synopsis: "An OCaml library implementing abstract binding trees (ABTs)"
description: """
An ABT library consistent with the interface defined in Robert Harper's
'Practical Foundations for Programming Languages', using immutable
pointers to for varibale binding."""
maintainer: ["shon.feder@gmail.com"]
authors: ["Shon Feder"]
license: "MIT"
homepage: "https://github.com/shonfeder/um-abt"
doc: "https://shonfeder.github.io/um-abt"
bug-reports: "https://github.com/shonfeder/um-abt/issues"
depends: [
"base-bigarray" {= "base"}
"base-threads" {= "base"}
"base-unix" {= "base"}
"dune" {= "2.8.5"}
"ocaml" {= "4.12.0"}
"ocaml-config" {= "2"}
"ocaml-system" {= "4.12.0"}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/shonfeder/um-abt.git"
name: "um-abt"
version: "dev"

1 comment on commit b047543

@shonfeder
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the single commented out line suffices to let the build go through.

Please sign in to comment.