fix(tests): check the closed ICU data mapping with msync on macOS #24921
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24921"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by XIIYAZ on 2026-11-21T11:01:17Z.
What
On macOS,
DataMemoryClose.cpp, added withudata_close(ee6f7dd1d2), does not compile, so a full build with-DBUILD_TESTING=ONstops:The test confirms that
udata_closeunmapped the data by callingmincoreon the mapping and expectingENOMEM, which is what Linux returns for an unmapped page. macOS declaresmincore(const void*, size_t, char*), notunsigned char*. With the type fixed, the check still fails on macOS (guest_icu_recovered_signaturesaborts at theerrno == ENOMEMline), because macOSmincoresucceeds on an unmapped page. A standalone program on macOS shows both calls on the same pages:On macOS the test now checks the unmapped range with
msync(mapping, pageSize, MS_ASYNC), which fails withENOMEMfor an unmapped page and succeeds for a mapped one. Linux keepsmincore, and Windows is unchanged.Tested
mainwith-DBUILD_TESTING=ON, x86_64 under Rosettaguest_icu_recovered_signaturesaborts at theENOMEMcheck. After this change: it passes.python3 tools/check_conventions.py --base origin/mainpasses.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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T11:10:40Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
0153abe2fe:tools/check_conventions.pypassed.guest_icu_recovered_signatures_testsbuilt cleanly.guest_icu_recovered_signatures):Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T11:17:15Z.
Review: APPROVED
Reviewed — looks good
The change uses
msyncfor the macOS unmapped-range assertion while preservingmincoreon other Unix platforms; the changed test file was read in full at the specified head.What I ran
0153abe2fe6b41fa5351aabd977092012c1f2f27.description.md,commits.md,manifest.json,diff.patch, and the full changed filecore/libs/prx/libSceIcu/tests/DataMemoryClose.cpp. No changed files were excluded by the manifest.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The reported macOS build, runtime test and conventions check were not run during this review. No other files were changed or excluded.
To get this to a good state
Nothing is required.