hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.83k stars 581 forks source link

SEGFAULT on `htop -s 0.2` - htop 2.2.0 #1018

Closed dmilith closed 4 years ago

dmilith commented 4 years ago
[1594389479] cb4-bh:~ λ lldb `which htop` -- -program_args "-s" "0.2"
(lldb) target create "/Software/Htop/exports/htop"
Current executable set to '/Software/Htop/exports/htop' (x86_64).
(lldb) settings set -- target.run-args  "-program_args" "-s" "0.2"
(lldb) r
Process 62477 launching
Process 62477 launched: '/Software/Htop/exports/htop' (x86_64)
Process 62477 stopped
* thread #1, name = 'htop', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00000000010a6bea htop`__interceptor_strcmp + 88
htop`__interceptor_strcmp:
->  0x10a6bea <+88>: movb   (%r12,%rbx), %r15b
    0x10a6bee <+92>: movb   (%r14,%rbx), %r13b
    0x10a6bf2 <+96>: incq   %rbx
    0x10a6bf5 <+99>: testb  %r15b, %r15b
(lldb) bt
* thread #1, name = 'htop', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00000000010a6bea htop`__interceptor_strcmp + 88
    frame #1: 0x0000000001116d90 htop`___lldb_unnamed_symbol1292$$htop + 688
    frame #2: 0x00000000011159df htop`main + 527
    frame #3: 0x000000000108c090 htop`_start + 144
(lldb
natoscott commented 4 years ago

This is fixed in the master branch ... right after the 2.2.0 release (Apr 2018). I guess you're using 2.2.0? Either way, the way you're using -s doesn't make sense (did you mean -d 0.2 perhaps?) - try 'htop -s help'.

commit 08a9b051c5b393e6050abd412df0510e36a9be1a Author: Christian Hesse mail@eworm.de Date: Tue Apr 10 16:21:46 2018 +0200

fix option string

This broke with commit db05ba61065f64b59d0014518be0786b5439e54c.
dmilith commented 4 years ago

Yes, 2.2.0 :) And I know it doesn't make sense, it was SEGFAULT by an accident… but still :)