-
Notifications
You must be signed in to change notification settings - Fork 74
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
emacs-tree-sitter causes emacs to SIGABRT on Ubuntu 20.10 #125
Comments
This is already fixed on tree-sitter runtime 0.19.3. The bug is present in tree-sitter runtime version 0.19.[0-2].Therw is probably one problematic query that triggers the crash. So you can bisect if you don't want to do a manual build of the newer tree-sitter version. The problem: tree-sitter/tree-sitter#968 (comment) |
Oh I see. That's certainly helpful. That said, if this is already fixes in 0.19.3 already seems to re referenced by Cargo.toml: [package]
name = "emacs-tree-sitter"
version = "0.15.0"
authors = ["Tuấn-Anh Nguyễn <ubolonton@gmail.com>"]
edition = "2018"
publish = false
[lib]
path = "src/lib.rs"
name = "tsc_dyn"
crate-type = ["cdylib"]
[dependencies]
emacs = "0.17"
libloading = "0.7.0"
tree-sitter = "0.19.3"
once_cell = "1.7.2" I guess if I can't find a way to bypass this bug, I will be forced to bisect the grammar, yes. |
It also seems like Could I be having some stale caches somewhere? |
I encountered this issue originally in For reference, I did a bisect and managed to isolate the offending rules as seen in this commit: emacs-csharp/csharp-mode@6566964 Any ideas on why those would make tree-sitter crash? Should this be reported further upstream? |
That is a related but probably different issue. This issue is caused by this assertion. Tree-sitter 0.19.4 still has it: echo '(prefix_unary_expression (identifier)* @variable)' | tree-sitter query /dev/stdin /tmp/empty.cs
Assertion failed: (exists), function ts_query__analyze_patterns, file src/./query.c, line 1236.
[1] 3970 done echo '(prefix_unary_expression (identifier)* @variable)' |
3971 abort tree-sitter query /dev/stdin /tmp/empty.cs |
Ooh great. Will give it a try 😃 |
Confirmed no longer crashing my emacs, even with (somehow) invalid queries. Great job! Thanks for the quick fix. Even quicker than the tree-sitter crate getting published 😲 |
Using latest Emacs built from git-master (
a9a4af6ff18487938f4859418e8e27ffb174af7c
) and latesttree-sitter
package(s) from MELPA, activating tree-sitter (forcsharp-tree-sitter-mode
) causes Emacs to SIGABRT.Please note: I was forced to wipe my
~/.emacs.d/elpa
folder after dist-upgrading, and then re-building Emacs from latest sources, and thus most likely pulled in the latest version oftree-sitter
too at the same time. This could in theory be a general regression.The following is the backtrace when Emacs is invoked through
gdb
:Checking
tsc-dyn.so
usingldd
gives the following output, which looks OK to me:I'm honestly not sure if this bug is related to Ubuntu 20.10, or something else.
The text was updated successfully, but these errors were encountered: