Skip to content

Rust-analyzer crashing with pointer being freed was not allocated error when using the chumsky crate #14257

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

Closed
Isaac-Leonard opened this issue Mar 5, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@Isaac-Leonard
Copy link

rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
rust-analyzer 0.0.0 (4e29820 2023-02-26)
Side note: Is the 0.0.0 meant to be there?
rustc version: (eg. output of rustc -V)
rustc 1.69.0-nightly (d962ea578 2023-02-26)
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)

Minimal viable example:
https://github.com/Isaac-Leonard/ra-crash-example.git
When running rust-analyzer through the emacs lap client it immediately crashes and prompts to restart.
When running
rust-analyzer analysis-stats .
from the terminal I get the following output:
$rust-analyzer analysis-stats .
Database loaded: 1.53s (metadata 905.73ms; build 568.62ms)
crates: 1, mods: 1, decls: 2, fns: 2
Item Collection: 4.35s
0/2 0% processing: parse_numberrust-analyzer(19983,0x202370600) malloc: *** erro
r for object 0x600000555e10: pointer being freed was not allocated
rust-analyzer(19983,0x202370600) malloc: *** set a breakpoint in malloc_error_br
eak to debug
[1] 19983 abort rust-analyzer analysis-stats .

As far as I know, this is not meant to happen.
It doesn't happen when not using functions from the Chomsky crate and only happens for certain functions though I'm not sure which.
The just() function doesn't trigger it but the text::int() one does.
It doesn't happen for chumsky versions less then 0.2 but its currently on 0.9.2

Please let me know if any more info is needed

@Isaac-Leonard Isaac-Leonard added the C-bug Category: bug label Mar 5, 2023
@Veykril
Copy link
Member

Veykril commented Mar 6, 2023

Duplicate of #14192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants