Repository navigation
Fix Windows text-mode file reading in processor tests - #42
Merged
Merged
Conversation
…CRLF conversion on Windows On Windows, text-mode file streams translate CRLF line endings, which can cause reads to return fewer bytes than expected when the file size is determined by seeking to the end.
…id CRLF conversion on Windows On Windows, text-mode file streams translate CRLF line endings, which can cause reads to return fewer bytes than expected when the file size is determined by seeking to the end.
Member
Probably a test that reads from a LGTM but it would be good to have the reasoning in the commit message |
illwieckz
force-pushed
the
illwieckz/windows-clrf
branch
from
October 13, 2026 02:34
5bfc05a to
8a60dd7
Compare
Member
Author
OK done. |
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.
On Windows, text-mode file streams translate CRLF line endings, which can cause reads to return fewer bytes than expected when the file size is determined by seeking to the end.
Read symbol files in
source_line_resolver_baseand microdump files inmicrodump_processor_unittestin binary mode to avoid this conversion and ensure the expected number of bytes can be read.These changes fix test failures on Windows caused by CRLF translation.
Imported from:
The issue was observed while running the MinGW Clang CI job on a Windows ARM64 system. It is not specific to ARM64, this was simply the first Windows system on which I ran these checks.
The issue did not reproduce in the MinGW GCC CI job for AMD64, which runs on Linux under Wine. This suggests that Wine's file-stream behavior may differ from native Windows in this case, potentially masking the issue. It could be a Wine bug that might affect other software in the opposite direction, and may be worth reporting separately.