Uh oh!
There was an error while loading. Please reload this page.
Windows: Fix Iterator name buffer size not handling all possible file name components - #13153
Conversation
matu3ba
left a comment
There was a problem hiding this comment.
The comments should be more conservative regarding guarantees, because the limits "generally work", but not in all cases (configuartions etc).
For general, portable + robust solutions, one must know the target systems limits and/or query the OS Kernel.
Please correct me, where I am wrong and which Kernels provide hard guarantees.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Also add some NAME_MAX or equivalent definitions where necessary
… name components Each u16 within a file name component can be encoded as up to 3 UTF-8 bytes, so we need to use MAX_NAME_BYTES to account for all possible UTF-8 encoded names. Fixesziglang#8268
…orms This is a slightly weird situation, because the 'real' value may depend on the host platform that the WASI is being executed on.
Make the test use the minimum length and set MAX_NAME_BYTES to the maximum so that: - the test will work on any host platform - *and* the MAX_NAME_BYTES will be able to hold the max file name component on any host platform
4da34d5 to
db80225Compare
Before this PR, the added test would have failed on Windows with the error found in #8268.
Fixes#8268.