-
Notifications
You must be signed in to change notification settings - Fork 566
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
i#3544 RV64: Implement return address handling for post wrappers #6736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this is covered by some tests, do these tests work now? If yes, maybe state that in the PR description and enable it in the RUN_ON_QEMU label for RISC-V so it can be checked by the CI.
I tested it only on my DR client. I don't familiar with DynamoRIO test system, and all I found is dynamorio/suite/tests/CMakeLists.txt Line 3032 in 8e23247
dynamorio/suite/tests/CMakeLists.txt Line 3061 in 8e23247
Also, as much as I understand, the one failing test (ci-aarchxx) isn't related to these changes, and is failing on current master. |
Yes, remove the guards should be enough for CMake to build the test, then add the test name into suite/tests/CMakeLists.txt#L6152 and run |
The tests couldn't be compiled currently for RISCV64: it needs a platform-depend fixes in suite/tests/client-interface/drwrap-drreg-test.dll.c, which requires implementing some functions in core/ir/riscv64/instr_create_api.h.in. |
I suppose you’re referring to XINST_CREATE_cmp() and XINST_CREATE_jmp_cond? There won’t be such thing on RISC-V since we don’t have eflags. You can use INSTR_CREATE_beq() to rewrite this part for RISC-V. |
Finally being able to compile and run tests. Test drwrap-callconv seems to work, but with drwrap-drreg things more complicated. The part with pre/post wrappers passes, the part with drreg save/restore registers fails. Moreover, for riscv default callconv is not working, it requires explicitly setup DRWRAP_CALLCONV_RISCV_LP64 | DRWRAP_REPLACE_RETADDR flags |
60340f8
to
59add87
Compare
Please don't do force push, see: https://dynamorio.org/page_code_reviews.html. |
@derekbruening @ksco Disabled unimplemented drwrap-drreg-test, now CI for riscv passes. |
Please see https://dynamorio.org/page_code_reviews.html#autotoc_md118 "request a re-review...clicking the re-review button..." |
Sorry still on vacation this week. |
Substitute value of return address register to enable post wrappers.
Partially enables drwrap-test for RISC-V:
but checks for clean_call and restore registers functionality are failing.
Issue: #3544