Skip to content

When TSDInfo is not present we were previously short circuiting, and …#35

Closed
dalehamel wants to merge 1 commit intomainfrom
fix-dtvinfo-read-when-tsd-not-present
Closed

When TSDInfo is not present we were previously short circuiting, and …#35
dalehamel wants to merge 1 commit intomainfrom
fix-dtvinfo-read-when-tsd-not-present

Conversation

@dalehamel
Copy link
Copy Markdown
Member

@dalehamel dalehamel commented Mar 27, 2026

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 ExtractLibcInfo with 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.

@dalehamel dalehamel force-pushed the fix-dtvinfo-read-when-tsd-not-present branch 3 times, most recently from 95bba74 to 9ff6430 Compare March 27, 2026 16:58
- 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
@dalehamel dalehamel force-pushed the fix-dtvinfo-read-when-tsd-not-present branch from 9ff6430 to 99e68cf Compare March 27, 2026 17:28
@dalehamel dalehamel closed this Apr 7, 2026
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.

1 participant