Skip to content
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

Crash with hax_lib::fstar::before in recursive bundle #1177

Open
maximebuyse opened this issue Dec 10, 2024 · 1 comment · May be fixed by #1179
Open

Crash with hax_lib::fstar::before in recursive bundle #1177

maximebuyse opened this issue Dec 10, 2024 · 1 comment · May be fixed by #1179
Assignees
Labels
bug Something isn't working engine Issue in the engine

Comments

@maximebuyse
Copy link
Contributor

mod a {
    #[hax_lib::fstar::after(impl, "assume val v: Type0")]
    pub fn f(){super::b::g()}
}
mod b {
    pub fn g(){super::a::f()}
}

Open this code snippet in the playground

This crashes with

Fatal error: exception ("Map.of_alist_exn: duplicate key"
  ((def_id
     ((krate playground)
       (path
         (((data (TypeNs a)) (disambiguator 0))
           ((data (ValueNs f)) (disambiguator 0))))))
    (kind Value)))
Raised at Base__Error.raise in file "src/error.ml" (inlined), line 9, characters 14-30
Called from Base__Map.Tree0.Of_foldable.of_foldable_exn in file "src/map.ml", line 1451, characters 8-113
Called from Base__Map.Using_comparator.of_alist_exn in file "src/map.ml", line 2800, characters 25-63
Called from Base__Map.of_alist_exn in file "src/map.ml" (inlined), line 2954, characters 23-84
Called from Hax_engine__Dependencies.Make.bundle_cyclic_modules.transform in file "lib/dependencies.ml", line 468, characters 8-117
Called from Hax_engine__Dependencies.Make.bundle_cyclic_modules.(fun) in file "lib/dependencies.ml", line 483, characters 14-30
Called from Base__List.concat_map.aux in file "src/list.ml", line 726, characters 34-40
Called from Hax_engine__Dependencies.Make.bundle_cyclic_modules in file "lib/dependencies.ml", line 479, characters 6-301
Called from Hax_engine__Phase_utils.MakeMonomorphicPhase.Implem.ditems in file "lib/phase_utils.ml", line 80, characters 49-57
Called from Hax_engine__Phase_utils.TracePhase.ditems.(fun) in file "lib/phase_utils.ml", line 261, characters 18-32
Called from Hax_engine__Phase_utils.BindPhase.ditems in file "lib/phase_utils.ml", line 300, characters 17-33
Called from Hax_engine__Phase_utils.BindPhase.ditems in file "lib/phase_utils.ml", line 300, characters 17-33
Called from Fstar_backend.apply_phases in file "backends/fstar/fstar_backend.ml", line 1828, characters 4-41
Called from Lib.run.run in file "bin/lib.ml", line 118, characters 16-50
Called from Hax_engine__Diagnostics.Core.try_ in file "lib/diagnostics.ml", line 123, characters 26-32
Called from Lib.run in file "bin/lib.ml", line 138, characters 4-348
Called from Lib.main in file "bin/lib.ml", line 201, characters 11-24
Re-raised at Lib.main in file "bin/lib.ml", line 228, characters 6-42
Called from Dune__exe__Native_driver in file "bin/native_driver.ml", line 23, characters 2-13
error: hax: hax-engine exited with non-zero code 2
@maximebuyse maximebuyse added bug Something isn't working engine Issue in the engine labels Dec 10, 2024
@maximebuyse maximebuyse self-assigned this Dec 10, 2024
@maximebuyse
Copy link
Contributor Author

Let's wait for #1163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engine Issue in the engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant