Skip to content

dua-core v5.0.1

Latest

Choose a tag to compare

@Byron Byron released this 25 Oct 14:20
467f3ec

Bug Fixes

  • fall back when macOS bulk directory reads are unavailable
    The new implementation can have a performance impact if the bulk reads are turned
    off, but this can be controlled with configuration so shouldn't be a problem.
    Also, it's for old systems.

    PowerPC and macOS before 10.10 do not provide getattrlistbulk, so
    unconditional native directory enumeration leaves dua-core consumers
    with an undefined symbol at link time.

    Select bulk reads from the target architecture and deployment version in
    build.rs. Respect MACOSX_DEPLOYMENT_TARGET, otherwise query the target
    compiler's default; unknown versions and architectures use ordinary
    directory reads. Keep the existing macOS entry/metadata API and preserve
    requested APFS clone metadata in the fallback.

    Review identified an unused 64 KiB allocation per directory in fallback
    builds. Make that buffer zero-sized, avoiding the heap allocation while
    keeping the shared reader layout and fallback behavior.

    Also omit clock_gettime before macOS 10.12, leaving the metadata probe's
    existing missing-clock behavior in place.

  • avoid reading past HEADER_SIZE in Windows ReadDir::entry_at
    FILE_ID_BOTH_DIR_INFO has a 104-byte fixed header (HEADER_SIZE) followed by FileName: [u16; 1] (2 bytes) and 6 bytes of trailing alignment padding (size_of::<FILE_ID_BOTH_DIR_INFO>() == 112).

Commit Statistics

  • 4 commits contributed to the release.
  • 10 days passed between releases.
  • 2 commits were understood as conventional.
  • 1 unique issue was worked on: #417

Commit Details

view details
  • #417
    • Fall back when macOS bulk directory reads are unavailable (67c8576)
  • Uncategorized
    • Merge pull request #418 from Byron/conditional-bulk-macos (fb5d863)
    • Merge pull request #416 from kiranani/fix-windows-entry-at-oob-read (48c91c7)
    • Avoid reading past HEADER_SIZE in Windows ReadDir::entry_at (b5ef287)