Coder Social home page Coder Social logo

Comments (8)

0-wiz-0 avatar 0-wiz-0 commented on May 9, 2024 1

I can't reproduce the core dump any longer with diffsitter compiled from git HEAD.
Thank you!

from diffsitter.

afnanenayet avatar afnanenayet commented on May 9, 2024

Well this is a first! I've never seen diffsitter segfault before. Appreciate the detailed bug report

from diffsitter.

afnanenayet avatar afnanenayet commented on May 9, 2024

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.

0-wiz-0 avatar 0-wiz-0 commented on May 9, 2024

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.

0-wiz-0 avatar 0-wiz-0 commented on May 9, 2024

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.

afnanenayet avatar afnanenayet commented on May 9, 2024

Thanks for trying that out! I'll keep digging

from diffsitter.

afnanenayet avatar afnanenayet commented on May 9, 2024

I was able to replicate the segfault and tried fixing with #786, do you still see the error with the latest nightly?

from diffsitter.

afnanenayet avatar afnanenayet commented on May 9, 2024

I appreciate the patience!

from diffsitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.