-
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
BPatch_addressSpace replaceFunctionCall does not set R12 on Power #589
Comments
@bwelton test1_14 in the testsuite tests this functionality and that test is passing on power. I just read the source code of the tests. The test contains replacing with a function in the binary and also replacing with a function in a shared library. So, the test really should catch this problem... |
@bwelton Which branch are you using? For your new project, do you think it may be better to use dyninst master? |
This may effect master as well as my branch (i have not run the test suite with master).
The test suite's replace function test for shared libraries may be too simple. The function call that is being replaced is not accessing any static data within the shared object (either literals or globals). Thus it is very likely never trying to read anything from R2 (you can confirm this by objdumping libA and looking at function test1_14_call2_libA). A simple reproducer for this would be to modify test1_14_call2_libA to add a global variable with a value of 2 and setting var using that variable.
|
@bwelton I see. I will then augment the test and fix the problem. |
@bwelton Are we certain that this is not a problem for master branch? |
replaceFunctionCall appears to be using a different path than inserting a function call that does not set R12 (causing the TOC to be miscalculated by the replaced function call).
The text was updated successfully, but these errors were encountered: