fix(libSceNKWebKit): keep inspector regex test strings alive #26856
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26856"
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 oneandonlydean on 2026-11-25T00:46:08Z.
What
nkwebkit_inspectorcontentsearchregexfails on Linux on main since #25170: "check failed at line 283".Latin1andUtf16in the test take a const reference and return aStringImplthat points into it.const StringImpl widePattern = Utf16(u"中");builds thestd::u16stringas a temporary that dies at the end of that statement, so the regex is compiled from a dead stack buffer. Windows happened to keep the bytes; Linux does not. The same pattern sits at two other lines (Latin1("a"),Latin1("")) and passes only by luck. I name the backing strings so they outlive theStringImpl. Test only; the library code is unchanged.Tested
Linux, Release, one build tree on main
fc54d18d8d: the test with this change passes 5 of 5 (ctest --repeat until-fail:5). The same build with the old test file fails at line 283 as on main.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)