Skip to content

Consider backport (or not) FileSystemEnumerator fixes for Unix #117250

@jozkee

Description

@jozkee

Opening this issue to track if we should backport our fixes in FileSystemEnumerator, our options are:

  1. No(ish) risk fix - Increase buffer size for readir_r and add support for enumerating filenames > 255 bytes #116619, in summary, it increases the buffer size to the largest known today (1024 instead of 256). It isn't as future proof as Remove readdir_r entirely and handle filenames > 255 bytes #116639 because it still depends on a buffer size but opposite to 116639, it doesn't pose the non-zero risk of moving from one syscall to another which was defined as non-thread-safe for many years by POSIX.
  2. Non-zero risk fix - Remove readdir_r entirely and handle filenames > 255 bytes #116639, while we are highly confident that no readdir implementation may pose a problem today, our obsession with compatibility still makes us hesitant to discard the risk. If we choose to backport this, it would be better to do it after preview6 so the change gets ingested by most users (scream test).
  3. Do nothing - These fixes can be labeled as reliability, I don't think we can choose this path as there's user reports showing this is hittable and hard to diagnose. Both options above also contain the IndexOf<byte>(0) fix mentioned by @jkotas which in itself is worth backporting.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions