Skip to content

Audit Darwin syscall IDs and ABI layouts against XNU #434

Open

Description

@LunaStev

Summary

Recent macOS work found a Darwin syscall number being interpreted as an operation it did not implement. The current amd64 and arm64 providers need a systematic audit against Apple XNU instead of relying on Linux similarity or undocumented assumptions.

Relevant code

  • std/sys/macos/amd64
  • std/sys/macos/arm64
  • macOS native CI cases

Scope

Audit every raw syscall identifier, argument order, return convention, constant, and native structure layout used by the macOS standard-library providers. Use the corresponding Apple XNU source and SDK declarations as authoritative references.

Acceptance criteria

  • A review table maps every used syscall and ABI structure to its XNU or SDK source.
  • amd64 and arm64 differences are recorded explicitly.
  • Incorrect, obsolete, or undocumented syscall assumptions are replaced with supported interfaces.
  • Filesystem, process, memory, socket, terminal, time, and environment paths have focused native smoke coverage.
  • Tests assert observable results rather than accepting any non-crash exit.
  • Source comments link or name the authoritative definition where the ABI is non-obvious.
  • No Linux syscall number or structure layout is reused on Darwin without proof.

Activity

  1. added
    bug
    help wanted
    technical debt
    os compatibility
    on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wantedos compatibilitytechnical debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions