refactor(icu): drop errno saves around guest copies #25945
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25945"
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 LeandroLP23 on 2026-11-22T23:43:47Z.
What
Follow-up to #25937, for ICU. Since #21243,
GuestCopyIn_nid_no_patch,GuestCopyOut_nid_no_patchandGuestWritable_nid_no_patchrestoreerrnothemselves (RestoreErrnoinlibc/src/General.cpp), so the helpers that save it around them are redundant.Bidi.cppandCharsetDetection.cpp: thePreservedErrnoguard class and the three helpers built on it (CopyInPreservingErrno,CopyOutPreservingErrno,WritablePreservingErrno) are removed. Their callers call the libc functions directly, with the same arguments.ConstrainedFieldPosition.cpp:GuestWritablePreservingErrnois removed the same way. The typedGuestCopyInPreservingErrnoandGuestCopyOutPreservingErrnostay, because they take the size from the type, and each becomes one line overGuestPtr, as in #25937.84 lines removed and 24 added. No change in behaviour.
Tested
Windows 11 (10.0.26300), WinLibs GCC 15.2.0 r7, Release.
ctest -R 'icu|bidi|ucsdet|charset', with its 80 build outputs fromtools/select_tests.py targets: 90 of 90 onmain19e5a34a46and 90 of 90 with this change applied to it.tools/check_conventions.pypasses.tools/pr_overlap.py --branchfinds no overlap with the 2476 open pull requests.Not run: Linux and macOS.
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 MarcZX10 on 2026-11-22T23:53:57Z.
Review: COMMENTED
Reviewed — no blocking findings
The changed code uses guest-copy helpers that preserve
errno, matching the removed guards; no blocking defect was found in the reviewed files.What I ran
Reviewed head
79e3090899c428f60bbc6fe1e2b511ce21738e28using the prepared diff andrepo_read.py. No tests or other commands were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports Windows tests and convention checks, but I did not run them. Linux and macOS behavior was not verified. All three changed files listed in the manifest were read; the bundle’s
files.jsonwas not available through the reader.To get this to a good state
Nothing is required.