GithubHelp home page GithubHelp logo

Segmentation fault on run about stag HOT 4 CLOSED

mikaldalsbo avatar mikaldalsbo commented on June 4, 2024
Segmentation fault on run

from stag.

Comments (4)

eigengrau avatar eigengrau commented on June 4, 2024

I too am getting an immediate segfault since updating from 9de521d to f199913. The segfault even occurs when running without any parameters or input, and also when piping data into the process.

I ran it through gdb:

(gdb) run
Starting program: /usr/bin/stag 
Got object file from memory but can't read symbols: File truncated.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff75f6174 in __strcmp_ssse3 () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff75f6174 in __strcmp_ssse3 () from /usr/lib/libc.so.6
#1  0x00000000004013b6 in main ()

I’m not a C coder, but I’ve never had the «truncated file» message before in gdb. Any idea what that might mean? Google didn’t really help. The message seems a bit odd; the file is unstripped, but I don’t think that’s what it’s about.

from stag.

eigengrau avatar eigengrau commented on June 4, 2024

It seems the Makefile overrode my CFLAGS, that’s why I had no line numbers. Here’s a new BT.

(gdb) run
Starting program: /tmp/makepkg/stag-graph-git/src/stag-graph/stag 
Got object file from memory but can't read symbols: File truncated.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff75f6174 in __strcmp_ssse3 ()
   from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff75f6174 in __strcmp_ssse3 ()
   from /usr/lib/libc.so.6
#1  0x00000000004013b6 in main (argc=1, argv=0x7fffffffdf98)
    at stag.c:69

Still says «file truncated» though.

from stag.

eigengrau avatar eigengrau commented on June 4, 2024

So I suppose the problem is strcmp(argv[1], "--help") == 0, which segfaults when no switches are set?

from stag.

seenaburns avatar seenaburns commented on June 4, 2024

Awesome work @eigengrau, that was exactly it.

Fixed in 1f010a1

from stag.

Related Issues (10)

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.