Repository navigation
Conversation
Every export threw, so an instrumented title failed at import resolution. The allocator and the three memory calls forward to the guest libc entry points in prx/libc/src/FileAndHeap.cpp and the rest implement the no-shadow model that compiler-rt's asan_interface.h describes, with every gap listed in the debt file.
Progress report (bb606f9 → e4ecb48)📈 System libraries: 30.73% (+0.75%, +282 implemented functions) ✅ 282 implemented
⚪ 153 behaviourally empty (constant return or throw)
Changed libraries (implemented exports)
|
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
|
Closing this in favour of #13265 and #13331 by @PrivacyOnion, which I found after opening it. Both predate this branch by a week, and #13331 already covers every export implemented here, so this adds nothing they do not. The overlap check I ran before opening reported no open pull requests because For the record, this branch is green: |
What
libSceAddressSanitizerdeclared 301 exports and every one of them threw, so a title that imports an instrumented runtime failed at import resolution instead of starting. The module now carries a real passthrough runtime.The allocator (
__asan_malloc,__asan_calloc,__asan_realloc,__asan_memalign,__asan_aligned_alloc,__asan_posix_memalign,__asan_reallocalign,__asan_free,__asan_malloc_usable_size) and__asan_memcpy,__asan_memmoveand__asan_memsetforward to the guest libc entry points, so the module and the title share one heap and either can free the other's pointer. The report family records the address, access type, size and expected value and calls the callback set by__asan_set_error_report_callback. The UBSan_aborthandlers callabort()as the compiler expects; the rest let execution continue.__asan_init, the global, elf and image registration calls, the coverage guard init and the fiber switch calls keep the state the runtime reports.It does not implement shadow memory. That is the passthrough model agreed in #12063: reserving the 124 GiB shadow of the guest arena would change the guest memory map, which is a memory-layout change rather than a library one. So no load or store is checked, no allocation carries a redzone and there is no quarantine, which means heap-buffer-overflow, use-after-free, double-free, stack-buffer-overflow, global-buffer-overflow and container-overflow go unreported. The debt entry names each of those, and the 19 exports whose prototype or data-object shape is not established still throw.
This closes no issue. It is section 1 of #12063; sections 2 to 4 of that issue (the Psml NIDs, the LoginDialog parameter layout and the list of exports that throw where Kyty has a body) are untouched, so the checklist line is
Fixes: nonerather than closing it.tools/progress.py: 29.44% → 30.18%, 282 of 301 implemented.Tested
Ubuntu 24.04 (Codespace), GCC 13.3, CMake 3.28, Release,
-DBUILD_TESTING=ON, full build.ctest -R '^guest_address_sanitizer$'passes. The test registers the guest heap, then exercises allocation, reallocation and free across the module, the alignment entry points, the three memory calls, the unaligned load and store helpers, the pointer comparison helpers, every no-op check and poison call, the report recording and callback, the fiber and coverage state, the symbolizer and contiguous-container calls, and every non-aborting UBSan handler.main: the same test binary withmain's library linked instead aborts in__asan_report_present not implemented.python3 tools/check_conventions.py --base upstream/mainpasses.OKand the patched library defines 301 exports with no name left unpatched.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)