Comments (8)
I can't reproduce the core dump any longer with diffsitter compiled from git HEAD.
Thank you!
from diffsitter.
Well this is a first! I've never seen diffsitter segfault before. Appreciate the detailed bug report
from diffsitter.
Hey this should be handled by #783. Would you mind trying out the nightly that gets released tonight to see if you get a better error message rather than a segfault? Based on the stacktrace I suspect the issue might be due to a tree-sitter ABI incompatibility between diffsitter and the grammar being loaded from the shared library
from diffsitter.
There sadly is no NetBSD nightly binary; but I built one myself, and have to report that the core dump is still there:
Program received signal SIGSEGV, Segmentation fault.
ts_language_version (self=0x7755964cad20) at src/./language.c:11
11 src/./language.c: No such file or directory.
(gdb) bt
#0 ts_language_version (self=0x7755964cad20) at src/./language.c:11
#1 0x0000000000414a7a in tree_sitter::Language::version::h67be3fd5209e76a7 ()
#2 0x00000000003edb90 in libdiffsitter::parse::ts_parser_for_language::h895546d8c18a2441 ()
#3 0x00000000003ee091 in libdiffsitter::parse::parse_file::hf26d7de1eb370d23 ()
#4 0x00000000003f53aa in libdiffsitter::generate_ast_vector_data::h642771b6eca102bf ()
#5 0x00000000003c1fe0 in diffsitter::main::hacbc4337717a7241 ()
#6 0x00000000003d5773 in std::sys_common::backtrace::__rust_begin_short_backtrace::h0a39bdcddde6b702 ()
#7 0x00000000003d7bcd in std::rt::lang_start::{{closure}}::h265f4f89e813b193 ()
#8 0x000000000052d4d7 in std::panicking::try::h0d6cfe1f8828421a ()
#9 0x00000000005094eb in std::rt::lang_start_internal::h927544304a5690c7 ()
from diffsitter.
Here's the --debug
output for that run:
Starting program: /usr/pkg/bin/diffsitter --debug lib/zip_source_winzip_aes_*
2023-12-24T16:36:09.333Z DEBUG diffsitter > Checking if lib/zip_source_winzip_aes_decode.c can be parsed
2023-12-24T16:36:09.333Z INFO libdiffsitter::parse > Deduced language "c" from extension "c" from default mappings
2023-12-24T16:36:09.333Z DEBUG diffsitter > Deduced language c for path lib/zip_source_winzip_aes_decode.c
2023-12-24T16:36:09.333Z DEBUG diffsitter > Checking if lib/zip_source_winzip_aes_encode.c can be parsed
2023-12-24T16:36:09.333Z INFO libdiffsitter::parse > Deduced language "c" from extension "c" from default mappings
2023-12-24T16:36:09.333Z DEBUG diffsitter > Deduced language c for path lib/zip_source_winzip_aes_encode.c
2023-12-24T16:36:09.333Z DEBUG libdiffsitter > Reading lib/zip_source_winzip_aes_decode.c to string
2023-12-24T16:36:09.333Z INFO libdiffsitter > Will deduce filetype from file extension
2023-12-24T16:36:09.333Z INFO libdiffsitter::parse > Deduced language "c" from extension "c" from default mappings
2023-12-24T16:36:09.333Z INFO libdiffsitter::parse > Loading dynamic library from libtree-sitter-c.so
2023-12-24T16:36:09.333Z DEBUG libdiffsitter::parse > Using name tree_sitter_c for dynamic function
2023-12-24T16:36:09.380Z INFO libdiffsitter::parse > Succeeded loading grammar for c
I have tree-sitter-c-0.20.5 installed.
from diffsitter.
Thanks for trying that out! I'll keep digging
from diffsitter.
I was able to replicate the segfault and tried fixing with #786, do you still see the error with the latest nightly?
from diffsitter.
I appreciate the patience!
from diffsitter.
Related Issues (20)
- [BUG] Subdirectory for grammar rust was not found HOT 9
- Add link to related project Semantic Diff Tool
- neovim support? HOT 1
- Latest stable version is missing Windows release HOT 2
- Check validity of selected renderer up front HOT 1
- [BUG] crash when comparing c++ files between git tags HOT 4
- Support git identifiers when running under git diff HOT 1
- [BUG] nightly deployment is failing
- Markdown support
- [BUG] Homebrew broken? HOT 2
- provide context in the form of unchanged lines or AST nodes HOT 1
- Version Control Merge Conflict Resolution HOT 1
- diffsitter should check the tree-sitter language version and report a better error upon mismatch
- [BUG] build script does not rerun if the grammar subdirectory changes
- [BUG] README 'usage' section has incorrect command for dump-default-config HOT 1
- Grammar associations don't work from root key
- Add ts and tsx file associations to defaults
- Support ignoring differences that only consist of variable/function name changes (eg. within minified JavaScript) HOT 1
- [BUG] `"exclude-kinds": ["string"]` does not work for Python HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffsitter.