-
Notifications
You must be signed in to change notification settings - Fork 75
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
Backport main
changes to the hiperf
branch and LLD fix
#165
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously has_tag reported true, even if the specified template had members (depending on the template arguments) that did not have a tag.
Use Clang, because GitHub Ubuntu latest image has gcc 9, that does not support concepts. clang 10 should have a better support. - https://gcc.gnu.org/projects/cxx-status.html - https://clang.llvm.org/cxx_status.html
Use cmake options (defaulting to on) for the bread and brecovery binaries, as well as the tests and examples. This aids installation of binlog through vcpkg.
Newly disabled checks: bugprone-easily-swappable-parameters google-readability-casting modernize-use-default-member-init readability-identifier-length The diff is bigger, as the checklist is now sorted.
erenon
changed the title
Backport
Backport Apr 20, 2023
main
changes to the hiperf
branchmain
changes to the hiperf
branch and LLD fix
In our custom ELF section, .binlog.esrc, we are storing 8 pointers/EventSource, see create_source.hpp. Previously, we listed the loaded files, and extracted these pointers from the on-disk files where the program was loaded from. GNU ld and gold sets these pointers build time to offsets in the file, that are relocated load time. lld, however, leaves them blank, a different kind of relocation is used instead. Therefore, we have to get the sources from memory, instead of disk. We are using dl_iterate_phdr to get the list of loaded objects + their load address. The program headers reference segments, a set of mapped sections. Unfortunately, I wasn't able to find the section headers in memory (probably it isn't there), so we still need to read the original file, find our custom section, and map it to a loaded segment. Since we are reading the pointers from loaded memory, our section must be "allocated". Since it contains relocations, it must be marked as writable, otherwise the linker warns: "relocation in read-only section `.binlog.esrc'". Therefore, we add "wa" to the .pushsection directive. A range-check bug in the original implementation was found and fixed by Eric Harding, that triggered the investigation that ended with this fix - thanks!
@spektrof PTAL and merge, thanks! |
spektrof
approved these changes
Apr 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should also fix the CI.