-
Notifications
You must be signed in to change notification settings - Fork 570
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#4940: Fix the wrong aflags estimation in drreg #4941
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.
Thank you for filing the issue and the PR. The CI tests shows some failures due to formatting. Please fix those and rerun.
It seems that this PR doesn't run our CI workflows automatically, because this is @JerryYouxin's first PR:
https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks. Someone with write access needs to approve these workflow runs everytime. I can do that when needed. The last commit is only a comment fix, so not running this time though. |
I have added the test similar to the gist, but I find that the test will fail with a segmentation fault in application code and I cannot figure out why. It seems that if the analysis phase of the test client ( |
@abhinav92003 I have implemented a minimal test for arithmetic flag liveness estimation in |
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.
Formatting is broken for newly added changes. Please see the recent clang-format CI run. You can install clang-format on your machine to automatically format your changes: https://dynamorio.org/page_code_style.html
Also, please change the PR description (and final commit description when you merge this PR) according to the Commit Messages section here: https://dynamorio.org/page_code_reviews.html. Particularly, please add the Issue: #NNNNN and Fixes: #NNNNN` string. Also, I usually prefer the PR/commit title to be short (less than 60 chars) so that Github doesn't wrap it in some pages. |
The check has passed in x86 but failed in ci-windows with vs2017. It seems that the bug may still exist in the windows platform.
|
@abhinav92003 I'm sorry that I cannot reproduce the test failure on my local windows machine, and I cannot figure out why the test is failed. Can you provide more details about the windows test (e.g., environment setup) to reproduce the failure for further analysis of the bug fixes? |
We have seen some issues before where we weren't able to reproduce test failures locally. Fortunately, there's a way to ssh into the Github Actions machine where the failure happened to get more info. See the section on "Debugging Tests on Github Actions Runner" at https://dynamorio.org/page_test_suite.html. Essentially, you need to change the Github Actions workflow config in your branch to invoke When you have sshed into the GA runner, then you can use |
@JerryYouxin We have granted the access required for you to run the CI workflows on your own. You should be able to run the workflows by pushing to this branch and also re-run a previously workflow from its page. This should help you try out the |
Unfortunately, I still cannot open the |
You're listed as a Pending member of Committers: you didn't accept the invitation yet it looks like. |
Thanks! The previous environment error is from my changes specified for my local machine and the error is gone when I revert those commits. But the |
run arm tests |
For some reason my previous comment didn't invoke Jenkins. @AssadHashmi do we need to add @JerryYouxin to any ACLs? |
The arm test is still not running. What should I do to run arm tests manually? |
To verify if access control is indeed the issue, I created a PR from my forked DR repo: #5004. It does run the AArch64 test suite as expected. Let me check if I can add you to the whitelist on Jenkins myself. I see that other committers are there. |
run arm tests |
@JerryYouxin I added you to the AArch64 Precommit whitelist. For now I triggered the build manually, but in future it should trigger automatically when you push to a branch. In the test run |
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.
LGTM, pending the unresolved comments.
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.
LGTM. Thanks for debugging and fixing the issue! Please take a look at the section on Final Commit Message before merging https://dynamorio.org/page_code_reviews.html.
You can use "run arm tests" in a separate comment to re-run any flaky CI test suite. If you find that there's no issue associated with some flaky test, please file one. |
It seems that the drreg-test fails in AArch64 CI tests and I cannot access an available local AArch64 machine for further debugging. @abhinav92003 Is there any way to debug this failing issue? |
We're hitting this check: This is because the total number of spill slots available in drreg are now different than before, so drreg is making different decisions about which spill slots to use. Note that the new call to We skip drx_init/drx_exit because that will change the number of total drreg spill slots available for the drreg tests. Skipping drx_init is okay because we use only drx_are_aflags_dead which doesn't need any drx state to be initialised. |
I have fixed the
|
run arm tests |
@@ -1154,7 +1154,6 @@ event_exit(void) | |||
drreg_exit() != DRREG_SUCCESS) | |||
CHECK(false, "exit failed"); | |||
|
|||
drx_exit(); |
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.
Please add the comment suggested on the PR's main thread, about why we need to skip drx_exit and drx_init calls.
I think you forgot to add this comment.
Both seem timeouts; try re-running by commenting "run arm tests". When I did that, only the |
run arm tests |
1 similar comment
run arm tests |
Oh great, it passed this time. I have added a comment to #4954 anyway, noting the consecutive failures. This PR seems good to go. Please modify the final commit message before merging as described here: https://dynamorio.org/page_code_reviews.html. |
@JerryYouxin -- please avoid duplicating the title for future merges (the docs https://dynamorio.org/page_code_reviews.html#autotoc_md117 talk about the separate edit box for the title line):
|
Fix issue #4940 to make sure the functionality of
drreg_reserve_aflags
/drreg_unreserve_aflags
anddrreg_aflags_are_dead
for conditional instructions likecmovcc
andsbb
.