linux: don't walk the rendez-vous while the linker is mid-update - #235
Merged
Merged
Conversation
Collaborator
Author
|
Note that this PR comes in this late in the stack because the tests for it are using things from previous patches. The fix itself could have been moved way earlier. |
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
2 times, most recently
from
September 1, 2026 14:22
8babaee to
8e618c1
Compare
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
3 times, most recently
from
September 9, 2026 07:48
26f2788 to
892f2ad
Compare
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
2 times, most recently
from
September 11, 2026 15:37
6be0613 to
1410291
Compare
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
from
September 14, 2026 10:39
1410291 to
eae75c5
Compare
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
from
September 14, 2026 11:14
eae75c5 to
c79e656
Compare
schopin-mozilla
removed this pull request from stack #236
September 14, 2026 16:22
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
from
September 14, 2026 16:23
c79e656 to
b184d8d
Compare
schopin-mozilla
added this pull request to stack #242
September 14, 2026 16:31
While playing around with edge cases scenarii, one of them stood out: what would happen if there was a crash *during* a dlopen() call? That's what this patch is about. Luckily for us, the libc folks know their stuff, and have a marker field in the RT_DEBUG structure: `r_state`. It is present in both bionic and glibc, with the same standard values, so we can probably assume it's fairly standard, probably part of the SVR4 ABI – not that it's documented anywhere besides random blog articles that lamented at the same thing. In any case, we can now bail early if the linker doesn't explicitly mark its data as consistent. Note that this impacts the DSO data dump, that will now be empty rather than filled with garbage, as well as the module stream that'll fall back to procmaps.
schopin-mozilla
force-pushed
the
rdv-linker-status
branch
from
September 17, 2026 11:37
b184d8d to
a76b750
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.
While playing around with edge cases scenarii, one of them stood out:
what would happen if there was a crash during a dlopen() call? That's
what this patch is about.
Luckily for us, the libc folks know their stuff, and have a marker field
in the RT_DEBUG structure:
r_state. It is present in both bionic andglibc, with the same standard values, so we can probably assume it's
fairly standard, probably part of the SVR4 ABI – not that it's
documented anywhere besides random blog articles that lamented at the
same thing.
In any case, we can now bail early if the linker doesn't explicitly mark
its data as consistent. Note that this impacts the DSO data dump, that
will now be empty rather than filled with garbage, as well as the module
stream that'll fall back to procmaps.
Stack created with GitHub Stacks CLI • Give Feedback 💬