Skip to content

fix: preserve numeric results, file data, and I/O deadlines - #631

Merged
LunaStev merged 9 commits into
wavefnd:masterfrom
LunaStev:fix/math-floating-point-boundaries
Sep 13, 2026
Merged

fix: preserve numeric results, file data, and I/O deadlines#631
LunaStev merged 9 commits into
wavefnd:masterfrom
LunaStev:fix/math-floating-point-boundaries

Conversation

@LunaStev

Copy link
Copy Markdown
Member

This fixes incorrect floating-point results, destructive same-file copies, incomplete bounded file reads, child pipe leaks, thread-only process exits, and socket operations that could outlive their timeout. Each issue has its own signed-off commit and regression coverage.

  • Preserve exact integers and signed zero when rounding, reject invalid approximate comparisons, avoid interpolation overflow between finite endpoints, and retain subnormal results for negative integer powers.
  • Read bounded files through EOF without depending on seekable size metadata. Compare opened file identities before truncating copy destinations, including hard links and symbolic links.
  • Close unused capture readers before child descriptor remapping and use Linux exit_group to terminate every thread.
  • Enforce timed socket I/O with per-call nonblocking operations on Unix and cancellable overlapped operations on Windows, without changing shared socket modes.
  • Add native I/O regression fixtures and include their harness in the Windows ARM64 CI runtime step.

Validation:

  • Workspace/all-target Rust tests: 197 passed; the native harness also passed 20 I/O scenarios on Linux.
  • Clippy with warnings denied, formatting, standard-library policy checks, and whitespace checks passed.
  • All 609 case source checks and four affected existing Linux cases passed.
  • Math regressions passed at O0/O2/O3, compiled for all 21 supported target triples, and ran under AArch64, RISC-V64, and LoongArch64 QEMU.
  • I/O object generation passed across 12 target triples. Supplementary Windows GNU/Wine checks covered file identity, bounded reads, timed I/O, cancellation, and IOCP completion suppression.
  • Each intermediate commit passed its corresponding regression checks.

Native macOS, FreeBSD, and Windows execution remains for platform hosts/CI; Wine checks do not replace native validation. Windows timed I/O requires overlapped-capable sockets. On cancellation errors Winsock does not report partial transfer counts, so returned counts describe confirmed completions.

Fixes #554
Fixes #555
Fixes #556
Fixes #557
Fixes #553
Fixes #552
Fixes #559
Fixes #565
Fixes #510

Fixes wavefnd#554.

Signed-off-by: LunaStev <luna@lunastev.org>
Fixes wavefnd#555.

Signed-off-by: LunaStev <luna@lunastev.org>
Fixes wavefnd#556.

Signed-off-by: LunaStev <luna@lunastev.org>
Fixes wavefnd#557.

Signed-off-by: LunaStev <luna@lunastev.org>
Fixes wavefnd#553.

Signed-off-by: LunaStev <luna@lunastev.org>
Fixes wavefnd#565.

Signed-off-by: LunaStev <luna@lunastev.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment