0.19.1: openkal-windows 0.10.1 - #42
Merged
Merged
Conversation
0.10.1 makes a file opened for writing describable. `kal_fs_file_info` answers through NtQueryInformationFile(FileBasicInformation), which requires FILE_READ_ATTRIBUTES, and `FILE_GENERIC_WRITE` does not carry it — so a write-only handle held every right except the one needed to ask it about itself. That reaches this package directly: `do_fstat` calls `okm_fs_file_info` and maps its error, so `fstat` on a descriptor the caller opened a line earlier returned EACCES on Windows. libarchive performs exactly that pair when opening an archive for output, and a consumer's Windows test suite was red on it. Measured on three real-Windows conformance jobs in openkal-windows: with the fix the query answers 0, without it 6.
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.
openkal-windows 0.10.1makes a file opened for writing describable.kal_fs_file_infoanswers throughNtQueryInformationFile(FileBasicInformation), which requiresFILE_READ_ATTRIBUTES, andFILE_GENERIC_WRITEdoes not carry it — so a write-only handle held every right except the one needed to ask it about itself.That reaches this package directly:
do_fstatcallsokm_fs_file_infoand maps its error, sofstaton a descriptor the caller opened a line earlier returnedEACCESon Windows. libarchive performs exactly that pair when opening an archive for output (archive_write_open_filename.c:178and:189), and a consumer's Windows test suite was red on it.Measured on three real-Windows conformance jobs in openkal-windows: with the fix the query answers
0, without it6(kal_err_access). Wine answers0either way and is recorded there as not being a second opinion.0.10.1was registered and published first (mcpplibs/mcpp-index#459), and verified resolvable from the published index before this branch was pushed — this repository's CI resolvesopenkal-windowsfrom the index rather than cloning it, so the order is load-bearing.