-
Notifications
You must be signed in to change notification settings - Fork 11
gdbserver crash on mips - Illegal instruction #51
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
Comments
Hmmm... However, i am fairly certain that gdbserver called longjmp. It seems like a solution for your problem would be to use a different toolchain - one that comes with a libc that is compiled without this opcodes enabled. Unfortunately, simply passing -msoft-float isn't enough - since libc.a / libc.so comes pre-compiled... |
Btw: if you could conpile gdbserver without the -s flag (simply remove it from build.sh), and then reproduce the crash - it would be helpful to make sure we are indeed crashing on longjmp |
I just manually compiled gdb+static musl with |
Musl is good since its source code is better and probably does not contain the same problem |
Btw, did you compile just gdbserver in static mode via musl? I tried changing our build scrupts to use musl instead of glibc to solve similar problems, but had problems with libexpat / libgmp that were tough to resolve, so it would be helpful to know if you managed to compile the whole thing via musl |
I just used nix: But I had to fix bug in gdb manually: https://sourceware.org/bugzilla/show_bug.cgi?id=21070 |
rust-lang/rust#34910 (comment) |
@patryk4815 If anything still does not work, please reopen this :) |
@guyush1 still same issue,
Crash at 0x21b04 offset ![]() ![]() |
Hello, i will take a look at this soon-ish. It is probably related to setjmp yet again and can be resolved via using the proper compiler |
Hello @patryk4815 , I think i have a solution for you. I compiled gdbserver with a soft-float mips compiler. This should guarantee that the problematic inline assembly at longjmp (which is not effected by -msoft-float) is not present anymore, so no floating point operations will be performed in longjmp and cause you to crash. Please try it and tell me if it works :). |
Closing this since we found a solution. I might add a mips-sf (soft-float) variant if more people need it. |
The text was updated successfully, but these errors were encountered: