Fix test flakiness on Linux#196
Open
schopin-mozilla wants to merge 4 commits into
Open
Conversation
Building a crash context from the current process and passing it to a writer that dumps *another* process is bound to cause issues. Using stable data, even if invalid, make the tests more predictable -> less flaky.
Up until now, getting a stack pointer to unmapped memory would just silently be ignored and result in an empty stack. This should probably be recorded instead.
If the stack pointer is garbage, it could point to a valid-but-unreadable mapping. Since we already ignore and move on if it points to unmapped memory, let's do the same in this case.
Similarly to stack pointers, garbage IP pointer could potentially point to an unreadable memory mapping rather than just unmapped memory. In that case, let's log and move on.
schopin-mozilla
requested review from
Jake-Shadle and
gabrielesvelto
as code owners
July 23, 2026 16:03
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.
Some of our tests build crash contexts for the parent process, to then write the minidump for a child process. Most of the time, the instruction and stack pointers will just point to unmapped memory, which is just silently ignored, but because of ASLR the memory layouts are random and it happens that sometimes they point to mapped but unreadable memory, leading to hard errors.
This branch addresses the issue on both ends: we build a zeroed out crash context (at least we know how it's invalid), and we also use soft errors rather than hard ones to be consistent with the unmapped experience.
FWIW, the unreadable case happens pretty frequently on Android ARM64 for some reason.