leanprover-community / leanprover-community/lean
Segfault during type checking
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 434
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Checked that your issue isn't already filed.
- Specifically, check out the wishlist, open RFCs,
or feature requests.
- Specifically, check out the wishlist, open RFCs,
- Reduced the issue to a self-contained, reproducible test case.
- Checked that your issue isn't already filed.
Description
Lean segfaults when type checking rather than giving a proper error.
Steps to Reproduce
inductive convex_hull : set α
| intrv (v₁ ∈ convex_hull) : convex_hull v₁
Expected behavior: A proper error about neither α nor set being known identifiers, or if they're in the context, acceptance.
Actual behavior: Lean segfaults with no output. For some people, a very similar example was producing many "unreachable code" errors, but I wasn't getting them on my particular setup.
The alternative version:
inductive convex_hull (s : set α) : set α
| of_set : ∀ v ∈ s, convex_hull v
| intrv (v₁ v₂ ∈ convex_hull) : convex_hull v₁
Reproduces how often: 100% (for me)
Versions
Lean (version 3.18.4, commit f539be1e867c, Release)
Windows 10
Additional Information
A segfault with no output occurs with both of the examples given on my machine, but some people who tried it in the zulip had unreachable code errors. One member had Lean continue working fine for the second example despite still giving unreachable code errors, though I couldn't reproduce.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce both inductive examples with Lean 3.18.4 on the reported setup, starting from the type-checking path mentioned in the issue. Done means neither example segfaults or emits unreachable-code failures, and invalid identifiers produce proper errors while valid contextual identifiers are accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100