When TSDInfo is not present we were previously short circuiting, and …#35
Closed
When TSDInfo is not present we were previously short circuiting, and …#35
Conversation
95bba74 to
9ff6430
Compare
- Only error out if BOTH reads fail - Only set the value if not an error on read - Add a regression test that builds an mock ELF file to verify the correct behaviour
9ff6430 to
99e68cf
Compare
This file contains hidden or 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
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.
In #929, I incorrectly added short circuiting where we would fail to read the DTV.
During the review of open-telemetry#1226, the first actual use of the DTV, nsavoire correctly pointed this out.
I recall that in an earlier version of the branch, I had anticipated this and just logged an error, but then in subsequent refactoring and addressing feedback this must have gotten lost.
To avoid this from happening again, I've added a regression test which actually calls
ExtractLibcInfowith a stub ELF binary for testing purposes to prove that it correctly still reads the DTV in this edge case where the DTV and TSD are in separate binaries, so we can actually merge them.My apologies for the oversight, between reviews and switching tasks I forgot about this edge case.