Hacker News new | ask | show | jobs
by therein 629 days ago
I wonder what happens if it specifies itself as the interpreter.
1 comments

Tried it, seems to crash immediately:

    $ strace ./true
    execve("./true", ["./true"], 0x7ffc9993be20 /* 40 vars */) = 0
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
    +++ killed by SIGSEGV +++
(hexedited copy of /bin/true; something different might happen with a specially crafted file which has no other data in it besides the name of the interpreter?)