Skip to content
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#5463: Avoid globals pre-relocation #5464

Merged
merged 2 commits into from
Apr 15, 2022
Merged

Conversation

derekbruening
Copy link
Contributor

Fixes errors that can lead to crashes in relocate_dynamorio, where its
access to a function pointer and to the page size can both return
garbage pre-relocation. We solve this with assembly to get the
current PC, and just using a 4K minimum page size for the backward
walk.

Tested with the PR #5462 branch where the new client.attach_blocking
test crashes without this fix on AArch64.
Manually tested on arm as well.

Fixes #5463

Fixes errors that can lead to crashes in relocate_dynamorio, where its
access to a function pointer and to the page size can both return
garbage pre-relocation.  We solve this with assembly to get the
current PC, and just using a 4K minimum page size for the backward
walk.

Tested with the PR #5462 branch where the new client.attach_blocking
test crashes without this fix on AArch64.
Manually tested on arm as well.

Fixes #5463
@derekbruening derekbruening requested a review from bete0 April 15, 2022 00:32
@derekbruening derekbruening merged commit 89a1144 into master Apr 15, 2022
@derekbruening derekbruening deleted the i5463-relocate-dr-crash branch April 15, 2022 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

relocate_dynamorio relies on globals that fail pre-relocation esp on AArch64
2 participants