http://bugs.winehq.org/show_bug.cgi?id=59926 --- Comment #10 from James M <f0rm4tm3@gmail.com> --- Thanks, I went back and measured native Windows behavior instead of asserting the behavior from my Wine patch. Since I'm on Linux and don't have a Windows machine, I used GitHub Actions windows-latest to run a native MSVC probe. Public repo: https://github.com/oldschoola/charprev-native-probe-20260628214054 Minimal v3 probe run: https://github.com/oldschoola/charprev-native-probe-20260628214054/actions/r... Build and run both succeeded. Output: PASS CharPrevA(str, str + 2): got 000000EB1DAFFD91 PASS CharPrevA(str, str): got 000000EB1DAFFD90 PASS CharPrevA(NULL, str + 1): got 000000EB1DAFFD90 PASS CharPrevA(NULL, str + 2): got 000000EB1DAFFD91 PASS CharPrevExA(CP_ACP, NULL, str + 1, 0): got 000000EB1DAFFD90 PASS CharPrevExA(CP_ACP, NULL, str + 2, 0): got 000000EB1DAFFD91 v3 CharPrev native behavior check passed So v2 was wrong: native Windows does not return NULL for these cases. It returns the previous character pointer. The v3 Wine conformance test encodes those Windows results directly, and wraps the NULL-start calls with Wine's exception macros (__TRY / __EXCEPT_PAGE_FAULT / __ENDTRY) so unpatched Wine reports a clean failure instead of crashing the whole test process. For the tested ASCII/CP_ACP cases, NULL start behaves as ptr - 1. I also ran an earlier exploratory probe that included CP932/DBCS: https://github.com/oldschoola/charprev-native-probe-20260628214054/actions/r... That showed CharPrevExA(932, NULL, dbcs + 2, 0) returned the DBCS lead byte, not a simple byte-wise ptr - 1. Because that expands the fix into DBCS backtracking semantics, I'm keeping CP932 out of v3 and will not claim a generic ptr - 1 rule for all code pages. Revised series attached: #81272 — kernelbase/tests: Add tests for CharPrevA NULL start. #81273 — kernelbase: Don't dereference NULL start in CharPrevA/CharPrevExA. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.