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

Segmentation fault in coq/getDocument call #397

Closed
Nfsaavedra opened this issue Mar 6, 2024 · 4 comments · Fixed by #398, ocaml/opam-repository#25552, ocaml/opam-repository#25570 or ocaml/opam-repository#25571

Comments

@Nfsaavedra
Copy link

Nfsaavedra commented Mar 6, 2024

Describe the bug
coq-lsp raises a segmentation fault when coq/getDocument is called on the file Coq.Numbers.Cyclic.Int63.PrimInt63 or Coq.Floats.PrimFloat of the Coq standard library.

To Reproduce
Steps to reproduce the behavior:

  1. Do a coq/getDocument call on the Coq.Numbers.Cyclic.Int63.PrimInt63 or Coq.Floats.PrimFloat file.

Expected behavior
Return the document instead of raising a segmentation fault.

Desktop

  • Pop!_OS 22.04 LTS/Ubuntu 20.04.3 LTS/Ubuntu 22.04.2 LTS
  • coq-lsp 0.1.8 (I think the issue also happens in 0.1.7)

Additional context
This issue is related to sr-lab/coqpyt#35.

@Nfsaavedra Nfsaavedra changed the title Segmentation fault in coq\getDocument call Segmentation fault in coq/getDocument call Mar 6, 2024
@Alizter
Copy link
Collaborator

Alizter commented Mar 6, 2024

@Nfsaavedra What version of Coq is this for?

@Nfsaavedra
Copy link
Author

@Nfsaavedra What version of Coq is this for?

8.18 when using 0.1.8. 8.17 when using 0.1.7.

@ejgallego
Copy link
Collaborator

That's for sure a SerAPI bug, thanks a lot for the report.

@ejgallego
Copy link
Collaborator

ejgallego commented Mar 6, 2024

SerAPI has to do some unsafe code to serialize all the Coq Ast, very unfortunately. coq-lsp has no unsafe code and should not segfault.

I will have a look, but it is possible that this is fixed on main.

@ejgallego ejgallego transferred this issue from ejgallego/coq-lsp Mar 20, 2024
@ejgallego ejgallego added this to the 0.17.3 milestone Mar 20, 2024
ejgallego added a commit that referenced this issue Mar 20, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit that referenced this issue Mar 20, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit that referenced this issue Mar 20, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit that referenced this issue Mar 21, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit that referenced this issue Mar 21, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit that referenced this issue Mar 21, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
ejgallego added a commit that referenced this issue Mar 21, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
ejgallego added a commit that referenced this issue Mar 21, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit that referenced this issue Mar 21, 2024
That was a quite dumb TODO I forgot about. But indeed, GADT remain an
issue for us.

Fixes #397 , fixes sr-lab/coqpyt#35

Thanks to Laetitia Teodorescu (@laetitia-teo) and Nuno
Saavedra (@Nfsaavedra) for the bug report.
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
ejgallego added a commit to ejgallego/opam-repository that referenced this issue Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment