test(libSceNKWebKit): keep clang from binding the AffineTransform constructor export to the implicit one #22859
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22859"
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 Jazeupoi on 2026-11-18T12:59:06Z.
What
nkwebkit_affinetransformguestpointerscrashes on macOS (SegFault) without ever calling the library.WebCore::AffineTransform target;default-initializes the struct, so clang emits its implicit default constructor in the test. The Itanium name of that constructor is_ZN7WebCore15AffineTransformC1Ev, the same symbol as theextern "C"export the test checks. Clang then binds the test's calls to_ZN7WebCore15AffineTransformC1Ev(unreadable)to its own inline constructor: the optimizedmainstores the identity matrix straight to address0x10and faults, instead of calling the export, which would thrownot implemented.target{}value-initializes the aggregate through its member initializers, so the constructor is no longer emitted and the calls go tolibSceNKWebKit.prx. The test checks the same things as before.Linux and Windows build with GCC and are not affected.
Tested
macOS 27.0.1, Apple clang 21.0.0, x86_64 build on an M4 Mac (Rosetta):
main:nkwebkit_affinetransformguestpointersfails with SegFault (EXC_BAD_ACCESSat0x30inmain). The-O0IR of the test has alinkonce_odrdefinition of_ZN7WebCore15AffineTransformC1Ev, and the-O3IR replaces the call with a 48-bytememcpytointtoptr (i64 16 to ptr).nkwebkit_affinetransform*tests pass, 3 runs each (ctest --repeat until-fail:3).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-18T13:01:01Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e490141ae6:tools/check_conventions.pypassed.nkwebkit_affinetransformguestpointers_testsbuilt cleanly.nkwebkit_affinetransformguestpointers):Looks Good To Me