Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

license_1.c #5

Open
Lerie82 opened this issue Jun 12, 2018 · 5 comments
Open

license_1.c #5

Lerie82 opened this issue Jun 12, 2018 · 5 comments

Comments

@Lerie82
Copy link

Lerie82 commented Jun 12, 2018

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.

@LiveOverflow
Copy link
Owner

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 :)

@Lerie82
Copy link
Author

Lerie82 commented Jun 12, 2018

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

@LiveOverflow
Copy link
Owner

LiveOverflow commented Jun 12, 2018

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.

@Lerie82
Copy link
Author

Lerie82 commented Jun 12, 2018

Okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@LiveOverflow @Lerie82 and others