liveoverflow_youtube icon indicating copy to clipboard operation
liveoverflow_youtube copied to clipboard

license_1.c

Open Lerie82 opened this issue 6 years ago • 5 comments

When i follow the youtube video (https://www.youtube.com/watch?v=3NTXFUxcKPc&t=8s), my gdb segfaults when i try to run the program after i set the breakpoint.

Lerie82 avatar Jun 12 '18 12:06 Lerie82

Hey! Sorry, I can't help you without any information whatsoever. Could you please follow the advice from this video?

https://www.youtube.com/watch?v=53zkBvL4ZB4

kind regards :)

LiveOverflow avatar Jun 12 '18 12:06 LiveOverflow

I am running Ubuntu (xenial)

$ uname -a

Linux localhost 3.18.0-17028-g3f022007a1b8 #1 SMP PREEMPT Tue May 29 21:57:58 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux

screenshot 2018-06-12 at 5 55 57 am

Also, while following the tutorial, ltrace, doesn't do what yours does. screenshot 2018-06-12 at 5 57 54 am

Lerie82 avatar Jun 12 '18 12:06 Lerie82

never had this issue before. My thinking right now is: gdb and ltrace modify code and inject int3 for breakpoints. And for whatever reason it looks like they didn't do it properly, or loose track of that, or can't catch the signal and then it crashes. For example the crash in gdb is at 0x4005fc. That's obviously not a valid instruction address from the original code. And it happens because gdb inserted a breakpoint at 0x4005fb, which destroys the first byte of the instruction. That shouldn't be a problem, but for some reason gdb couldn't handle the SIGTRAP signal and thus couldn't restore the original instruction/state. So I wonder if there is something preventing regular applications to catch this signal?

Could you please try this on a clean install of this linux image, because I have no clue what you did to your system. If the issue persists with said image, please share which image it is, because then I can reproduce it.

LiveOverflow avatar Jun 12 '18 13:06 LiveOverflow

Okay, thanks.

Lerie82 avatar Jun 12 '18 13:06 Lerie82