Giter Site home page Giter Site logo

wsh segfaulting on startup about wcc HOT 2 CLOSED

endrazine avatar endrazine commented on July 22, 2024
wsh segfaulting on startup

from wcc.

Comments (2)

endrazine avatar endrazine commented on July 22, 2024

Hi no-boot-device, Thanks for your bug report.
This is an interresting case !

[SIGSEGV] Read 000000000017 (address not mapped to object)

This tells us that the bug is a Segmentation Fault due to a read operation at address 0x17, which is not mapped. That's a null pointer.

From the backtrace, it happened in function scan_sections() from wsh. What is unexpected is that wsh went that far given that it has been invoked witout a binary to analyse in the command line. On my machine, the same command gives :

jonathan@blackbox:~$ wsh
ERROR: No binary to execute
jonathan@blackbox:~$ 

I have modified wsh_getopt() to assert at least one argument has been given to wsh. Here is what it new looks like:

jonathan@blackbox:~/wcc$ ./bin/wsh        
ERROR: not enough arguments !
Try --help for help.
jonathan@blackbox:~/wcc$ 

That should resolve the bug. Let me know if this works on your machine too :)

Cheers,

j-

from wcc.

Silur avatar Silur commented on July 22, 2024

however the exact same backtrace is shown even if I pass an executable to it, tried it with ./ and fullt-path notation

$ wsh /tmp/testme
[SIGSEGV]       Read    000000000017        (address not mapped to object)
        000042009ce4    wsh(scan_sections+0x91)
        000042009dfd    wsh(shdr_callback+0x60)
        7ff7beab25a4    /usr/lib/libc.so.6(dl_iterate_phdr+0xf4)
        00004200cd41    wsh(reload_elfs+0x2f8)
        00004201de40    wsh(main+0x67)
        7ff7be9b4291    /usr/lib/libc.so.6(__libc_start_main+0xf1)
        0000420078fa    wsh(_start+0x2a)
Segmentation fault

Naturally I have the latest master

from wcc.

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.