Skip to content

test(aot): qualify modular TLS workers against a native C reference - #4523

Closed
yabanana wants to merge 225 commits into
boykopovar:mainfrom
yabanana:feature/aot-modular-consumer
Closed

yabanana wants to merge 225 commits into
boykopovar:mainfrom
yabanana:feature/aot-modular-consumer

Conversation

@yabanana

@yabanana yabanana commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Add a reproducible three-image C consumer: dependency initialization, shared data, cross-module TLS and two guest-created workers using production AnyPS5 create/join. Each worker runs the unchanged external SHA-256 component. Convert the x86 ELF images separately and compare the ARM64 executable with the same C source independently compiled for ARM64 and Python hashlib.

Four worker pairs check TLS templates/zero-fill, simultaneously distinct addresses, main-thread isolation, join results, buffer guards and finalization. Injected initializer failure checks rollback. Source, contracts, IR, object, executable and runtime identities are recorded in fresh build receipts.

Reproduce with the native graphics build, the pinned external SHA source checkout, and either LLVM ld.lld or Zig 0.14.1 as the offline ELF fixture linker: cmake --build build --target native_module_bundle_check. BUILD.md documents the configuration. No external source or binary is added to the repository. This qualifies a source-built closed C bundle, not arbitrary console startup, games or stripped-input recovery.

Tested

Latest integration checkpoint (12 October): aligned with main 2f4cc8983, including the new component technical-debt layout. The final combined stack with the separate C++ follow-up #4718 passed 588 compiler/relinker/runtime checks and 26 native integrations on Apple Silicon. Rebuilt cube AOT/reference still match all eight RGB frames after 600 flips each; controller and typed module-bundle acceptance pass. These are local results; hosted CI is running on the updated head. Full Linux/Windows builds still require maintainer dispatch.

Apple Silicon/macOS, final integrated stack based on main fe66af1: 526 compiler/relinker/runtime checks passed (native hello rerun with sysctl access); 26 native integration cases passed, including descriptor control, TLS/thread lifecycle and the modular consumer. Rebuilt graphics AOT/reference completed 600 flips each, teardown and eight exact RGB comparisons. Controller O2 scenarios and production sleep smoke, SHA-256 O0/O2 and independent memcmp O0/O2 passed. These are local combined-stack results; hosted CI on this PR is pending. Full Linux/Windows builds require maintainer dispatch.

The thread adapter also passed ASan/UBSan and ThreadSanitizer in isolated failure/race tests before platform integration; these use controlled providers. The modular consumer separately runs production create/join. No performance or port-completion percentage claim.

Checklist

Rebase the graphics proposal onto upstream b42ef24 without carrying the historical macOS merge chain. Includes the compiler/runtime prerequisite from PR boykopovar#1835 and the still-required macOS foundation from mugurc/macos-port at 21930ce; those platform changes remain until their upstream PRs land. Preserve upstream starting-quad folding and the qualified vertex lane rule. Keep x87-dependent Math.cpp outside the optional ARM64 graphics closure rather than weakening its ABI assertion.
This was referenced Oct 15, 2026
@yabanana

Copy link
Copy Markdown
Contributor Author

Superseded by #5021, which now contains the consolidated native ARM64 AOT implementation and verified consumers. #1835 remains the architecture discussion. Closing this stacked PR to keep one implementation review; its branch and review history are retained. This is not a merge into main.

@yabanana yabanana closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build ci .github docs libc libkernel needs rebase Conflicts with main, rebase needed prx relinker shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant