TUESDAY, SEPTEMBER 22, 2026
codeview
Codeview checksums now open source files in binary mode.
Fixes incorrect CodeView checksums on Windows by opening source files in binary mode.
The CodeView debugging information generator now opens source files in binary mode. On Windows, text mode file opening translates CRLF line endings, leading to incorrect checksums. Opening in binary mode ensures the checksum accurately reflects the file’s content.
In Details
The md5_stream function in dwarf2codeview.cc calculates checksums for source files. On Windows, default text mode file I/O performs CRLF to LF translation. This change ensures files are opened in binary mode to prevent this translation, guaranteeing correct checksums for CodeView debug info.