-
Notifications
You must be signed in to change notification settings - Fork 157
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
Allow usage of SIGILL for signal trampolines #963
Conversation
However, SIGTRAP is always intercepted by GDB, causing it is almost impossible to debug through signal trampolines. In this commit, we add a new environment variable DYNINST_SIGNAL_TRAMPOLINE_SIGILL to control whether we use SIGILL as the signal for trampolines. If DYNINST_SIGNAL_TRAMPOLINE_SIGILL is set, we use SIGILL as signal trampolines and the mutator will generate illegal instructions in the mutatee. In the case of binary rewriting, DYNINST_SIGNAL_TRAMPOLINE_SIGILL should be consistently set or unset when rewriting the binary and running the rewritten binaries.
@hainest I don't have a good way to test this. I remembered that you had a use case where you have to debug through trap trampolines. Can you check whether PR fixes your problem? |
I do. I will test it out when I'm done testing some PRs. Thanks! |
https://bottle.cs.wisc.edu/search?dyninst_branch=PR963 Turning on DYNINST_SIGNAL_TRAMPOLINE_SIGILL, causes regressions- mostly in proccontrol tests. Note that I only used the new flag on cayenne. |
@hainest It is expected that turning on The purpose of So, for this PR, I think the criteria is to see what happens with the rewriter tests under GDB and whether it would help with debugging. |
Of course, this PR also needs to be tested when not turning on |
That makes sense. Can we add this to the documentation for this flag?
It was. Only the run on cayenne was done with the flag turned on. Running without the flag shows no regressions. |
Add a new environment variable
DYNINST_SIGNAL_TRAMPOLINE_SIGILL
to control whether we use SIGILL as the signal for trampolines.If
DYNINST_SIGNAL_TRAMPOLINE_SIGILL
is set, we use SIGILL as signal trampolines and the mutator will generate illegal instructions in the mutatee.In the case of binary rewriting,
DYNINST_SIGNAL_TRAMPOLINE_SIGILL
should be consistently set or unset when rewriting the binary and running the rewritten binaries.