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

Re-architect use of heap relocations in x86 write barriers #10538

Open
0xdaryl opened this issue Sep 8, 2020 · 0 comments
Open

Re-architect use of heap relocations in x86 write barriers #10538

0xdaryl opened this issue Sep 8, 2020 · 0 comments

Comments

@0xdaryl
Copy link
Contributor

0xdaryl commented Sep 8, 2020

The x86 write barrier evaluators use a number of "fake" relocations defined here:

https://github.com/eclipse/omr/blob/983f4e2e9a5b4291ea4c260e61c5d5015f673bb2/compiler/runtime/Runtime.hpp#L215

Presumably, this is because they all eventually map to a TR_GlobalValue relocation but there was no means of "carrying" the kind information from the evaluation phase to the binary encoding phase when the relocations are created. The binary encoding phase is the only consumer of these "relocations".

I call them "fake" relocations because they indiscriminately overload relocation numbers 100-104. These appear to have been added 10 years ago when the number of relocations was relatively small and "100" different relocation types seemed an impossibly long way off. However, since the number of relocations is more than 100 now these are actually incorrect. I don't know if this will actually cause a problem, but this is not a good design going forward.

The values could either be "adjusted", or the problem that prompted their introduction should be rethought to avoid their use. I prefer the latter approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant