Windows: a converted executable stops at start-up when its directory path is outside the ANSI code page #2640

Closed
opened 2026-10-10 09:43:29 +00:00 by justdoston · 9 comments
justdoston commented 2026-10-10 09:43:29 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by justdoston on 2026-10-10T09:43:29Z.


What

A --windows executable stops before its guest entry when the path of its directory contains a character that the system ANSI code page cannot represent: Japanese, Chinese or Korean folder names on a Western-locale system, any emoji, or scripts without an ANSI code page such as Devanagari.

The entry stub (WindowsEntryStubBuilder) reads its own path with GetModuleFileNameA, which replaces each such character with ?, and then uses the result with SetCurrentDirectoryA (since #2574) and LoadLibraryExA. The --windows-diagnostics stub (WindowsDependencyStubBuilder) does the same with GetFileAttributesA, GetModuleHandleA and the lstr*A functions.

Measured

The executable and bundled modules from test_windows_import_modules.py (exit code 11 once the guest entry runs), converted with relinker --windows on main cd73e149 and run under Wine 10.0 with the en_US locale (ANSI code page 1252) from three directories:

directory result
ascii exit 11
José exit 11 (é is in code page 1252)
日本 FAIL: cannot make the executable directory the current directory, GetLastError: 123 (ERROR_INVALID_NAME)

GetModuleFileNameA replaces unrepresentable characters with ? on Windows too, so I expect the same result there, but it has not been run on a Windows machine yet.

Proposal

Use the wide API in both stubs: GetModuleFileNameW, SetCurrentDirectoryW, LoadLibraryExW, GetFileAttributesW, GetModuleHandleW and the lstr*W functions, with library names and the --rpath text stored as UTF-16. A regression case can run the converted executable from a directory such as ü日 in the Windows relinker tests.

I'd like to work on this, unless someone already is.

AI-assisted: yes. An AI agent (Claude Code) did most of this work: it found the problem, ran the measurements and wrote this report.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5790070416 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640). Originally posted by [justdoston](https://github.com/justdoston) on 2026-10-10T09:43:29Z. --- ### What A `--windows` executable stops before its guest entry when the path of its directory contains a character that the system ANSI code page cannot represent: Japanese, Chinese or Korean folder names on a Western-locale system, any emoji, or scripts without an ANSI code page such as Devanagari. The entry stub (`WindowsEntryStubBuilder`) reads its own path with `GetModuleFileNameA`, which replaces each such character with `?`, and then uses the result with `SetCurrentDirectoryA` (since #2574) and `LoadLibraryExA`. The `--windows-diagnostics` stub (`WindowsDependencyStubBuilder`) does the same with `GetFileAttributesA`, `GetModuleHandleA` and the `lstr*A` functions. ### Measured The executable and bundled modules from `test_windows_import_modules.py` (exit code 11 once the guest entry runs), converted with `relinker --windows` on `main` cd73e149 and run under Wine 10.0 with the `en_US` locale (ANSI code page 1252) from three directories: | directory | result | |---|---| | `ascii` | exit 11 | | `José` | exit 11 (`é` is in code page 1252) | | `日本` | `FAIL: cannot make the executable directory the current directory`, `GetLastError: 123` (`ERROR_INVALID_NAME`) | `GetModuleFileNameA` replaces unrepresentable characters with `?` on Windows too, so I expect the same result there, but it has not been run on a Windows machine yet. ### Proposal Use the wide API in both stubs: `GetModuleFileNameW`, `SetCurrentDirectoryW`, `LoadLibraryExW`, `GetFileAttributesW`, `GetModuleHandleW` and the `lstr*W` functions, with library names and the `--rpath` text stored as UTF-16. A regression case can run the converted executable from a directory such as `ü日` in the Windows relinker tests. I'd like to work on this, unless someone already is. AI-assisted: yes. An AI agent (Claude Code) did most of this work: it found the problem, ran the measurements and wrote this report.
justdoston commented 2026-10-10 09:57:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by justdoston on 2026-10-10T09:57:56Z.


Fix branch: https://github.com/justdoston/AnyPS5/tree/fix/windows-unicode-executable-path

  • The entry stub reads its path with GetModuleFileNameW and enters its directory and loads its libraries with SetCurrentDirectoryW and LoadLibraryExW. Library paths are stored as UTF-16, decoded from UTF-8 at relink time (invalid UTF-8 throws).
  • Messages and the --windows-diagnostics walker still get the paths in the ANSI code page, so their output is unchanged; the walker's ANSI API is recorded in TechnicalDebt and can follow separately.
  • test_windows_working_directory gains a unicode ü日 case, which runs on Windows.

Tested: Linux relinker ctest 97/97. Under Wine 10.0 (en_US, code page 1252) the converted test executables now start from ascii, José, 日本 and an emoji directory, with bundled modules, libraries from libs\, an absolute --rpath and --windows-diagnostics, and an unresolved import still stops with its message. Not run on a Windows machine.

AI-assisted: yes. An AI agent (Claude Code) did most of the work: the code, the tests and this comment.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096341176 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096341176). Originally posted by [justdoston](https://github.com/justdoston) on 2026-10-10T09:57:56Z. --- Fix branch: https://github.com/justdoston/AnyPS5/tree/fix/windows-unicode-executable-path - The entry stub reads its path with `GetModuleFileNameW` and enters its directory and loads its libraries with `SetCurrentDirectoryW` and `LoadLibraryExW`. Library paths are stored as UTF-16, decoded from UTF-8 at relink time (invalid UTF-8 throws). - Messages and the `--windows-diagnostics` walker still get the paths in the ANSI code page, so their output is unchanged; the walker's ANSI API is recorded in TechnicalDebt and can follow separately. - `test_windows_working_directory` gains a `unicode ü日` case, which runs on Windows. Tested: Linux relinker `ctest` 97/97. Under Wine 10.0 (`en_US`, code page 1252) the converted test executables now start from `ascii`, `José`, `日本` and an emoji directory, with bundled modules, libraries from `libs\`, an absolute `--rpath` and `--windows-diagnostics`, and an unresolved import still stops with its message. Not run on a Windows machine. AI-assisted: yes. An AI agent (Claude Code) did most of the work: the code, the tests and this comment.
MarcZX10 commented 2026-10-10 10:21:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T10:21:33Z.


Follow-up after the updated branch

Thanks for explaining the executable's current MAX_PATH behavior and for updating the test to rename the directory after conversion. I no longer consider my earlier ANSI scratch-buffer observation a substantiated blocker for this change.

I applied the author's three commits through bcb8d644 to current upstream main 507f49fb in an isolated worktree. The five-file diff applies cleanly.

Check Result
Relinker-only Release build (Linux x86_64, GCC 12.2, Unix Makefiles) Passed
Relinker CTest suite Passed (97/97)
Conventions against current main Passed
git diff --check Passed

This Linux run does not execute the generated Windows code. The earlier native Windows run on bf3bbd91 confirmed the executable-directory fix for CJK and Arabic paths, and the author reports the updated diagnostic path passes under MinGW/Wine. The author notes the fixture cleanup failure still needs a native Windows run, so I have not treated that as validated here.

No matching pull request exists for this branch as of this check. AI-assisted change; the author has disclosed that in the issue.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096515997 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096515997). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T10:21:33Z. --- ### Follow-up after the updated branch Thanks for explaining the executable's current `MAX_PATH` behavior and for updating the test to rename the directory after conversion. I no longer consider my earlier ANSI scratch-buffer observation a substantiated blocker for this change. I applied the author's three commits through `bcb8d644` to current upstream `main` `507f49fb` in an isolated worktree. The five-file diff applies cleanly. | Check | Result | |---|---| | Relinker-only Release build (Linux x86_64, GCC 12.2, Unix Makefiles) | Passed | | Relinker CTest suite | Passed (97/97) | | Conventions against current `main` | Passed | | `git diff --check` | Passed | This Linux run does not execute the generated Windows code. The earlier native Windows run on `bf3bbd91` confirmed the executable-directory fix for CJK and Arabic paths, and the author reports the updated diagnostic path passes under MinGW/Wine. The author notes the fixture cleanup failure still needs a native Windows run, so I have not treated that as validated here. No matching pull request exists for this branch as of this check. AI-assisted change; the author has disclosed that in the issue.
husseinkad commented 2026-10-10 10:29:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T10:29:11Z.


Native Windows check of justdoston:fix/windows-unicode-executable-path (bf3bbd91, merges cleanly onto main a29ef592). Windows 11 Pro 10.0.26200, ANSI code page 1252, WinLibs GCC 15.2.0 r7, relinker-only Release build.

The fix works. I converted a fixture in an ASCII directory, copied the tree to a differently named directory, launched output.exe from another directory and read the child's current directory:

Directory name main branch
ascii CWD_OK CWD_OK
ü CWD_OK CWD_OK
cjk-日本 exit 0xc000000d, GetLastError 123 CWD_OK
arabic-عربي exit 0xc000000d, GetLastError 123 CWD_OK

So #2640 reproduces on main and the stub change resolves it.

The new test case fails on this machine, before and after the fix. ctest --test-dir build-relinker gives 92 of 93; windows_working_directory fails with FAIL: filesystem error: Cannot convert character sequence: Illegal byte sequence. The failure is in the test driver's own host tool, not the stub: core/relinker/main.cpp:46-55 calls std::filesystem::path(argv).string() on a narrow argv. On a cp1252 system a ü path hits that conversion error (a standalone g++ probe shows the same), and a 日 path has already become ? by the time it reaches argv. So test_windows_working_directory.py line 106 can only pass where the ANSI code page is UTF-8, such as Wine or the UTF-8 beta setting, and not on a default Western Windows install. It may be worth driving that case through the stub directly, as in the table above, or converting argv through the wide command line.

On the writeAnsi question raised in review: PathCapacity is 32768 and the ANSI buffers are 32768 bytes, so the byte count matches the buffer and nothing overflows. It only matters for paths over about 16k wide characters on a double-byte ANSI page, and I could not test one here (cp1252 is single-byte).

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096571701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096571701). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T10:29:11Z. --- Native Windows check of [`justdoston:fix/windows-unicode-executable-path`](https://github.com/justdoston/AnyPS5/tree/fix/windows-unicode-executable-path) (`bf3bbd91`, merges cleanly onto `main` a29ef592). Windows 11 Pro 10.0.26200, ANSI code page 1252, WinLibs GCC 15.2.0 r7, relinker-only Release build. **The fix works.** I converted a fixture in an ASCII directory, copied the tree to a differently named directory, launched `output.exe` from another directory and read the child's current directory: | Directory name | `main` | branch | |---|---|---| | `ascii` | CWD_OK | CWD_OK | | `ü` | CWD_OK | CWD_OK | | `cjk-日本` | exit 0xc000000d, `GetLastError 123` | CWD_OK | | `arabic-عربي` | exit 0xc000000d, `GetLastError 123` | CWD_OK | So #2640 reproduces on `main` and the stub change resolves it. **The new test case fails on this machine, before and after the fix.** `ctest --test-dir build-relinker` gives 92 of 93; `windows_working_directory` fails with `FAIL: filesystem error: Cannot convert character sequence: Illegal byte sequence`. The failure is in the test driver's own host tool, not the stub: `core/relinker/main.cpp:46-55` calls `std::filesystem::path(argv).string()` on a narrow `argv`. On a cp1252 system a `ü` path hits that conversion error (a standalone g++ probe shows the same), and a `日` path has already become `?` by the time it reaches `argv`. So `test_windows_working_directory.py` line 106 can only pass where the ANSI code page is UTF-8, such as Wine or the UTF-8 beta setting, and not on a default Western Windows install. It may be worth driving that case through the stub directly, as in the table above, or converting `argv` through the wide command line. On the `writeAnsi` question raised in review: `PathCapacity` is 32768 and the ANSI buffers are 32768 bytes, so the byte count matches the buffer and nothing overflows. It only matters for paths over about 16k wide characters on a double-byte ANSI page, and I could not test one here (cp1252 is single-byte). AI-assisted: yes.
justdoston commented 2026-10-10 10:33:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by justdoston on 2026-10-10T10:33:32Z.


Thanks both, and @husseinkad for the native Windows run.

@husseinkad You're right about the test: the relinker reads its arguments as narrow strings, so on a cp1252 system that case never reached the stub. bcb8d644 converts it under an ASCII name and renames the directory to unicode ü日 before starting the executable, as in your table. Reading the relinker's own arguments through the wide command line (core/relinker/main.cpp) is a separate fix that I've left out of this branch.

@MarcZX100 On the text buffers: the executable has no long-path-aware manifest, so the directory it can enter with SetCurrentDirectoryW is limited to MAX_PATH and that call fails first. A path whose text is longer than the 32 KiB buffer (now more than about 10,900 non-ASCII UTF-16 units, since the text is UTF-8) stops with the existing FAIL: executable or library path is too long rather than overflowing. Sizing the buffers at three bytes per unit would add 64 KiB of file data per library, because they sit before the error strings in .startup and the PE writer only trims trailing zeros. I can do that, or move the buffers to the zero tail, if a maintainer prefers.

The branch also now covers the --windows-diagnostics walker (4fe56534), so the TechnicalDebt entry from the first commit is gone:

  • The walker keeps its paths in UTF-8 and converts them at its Windows calls, which now use GetModuleHandleW, LoadLibraryExW, GetFileAttributesW, GetModuleFileNameW and GetSystemDirectoryW. The entry stub prints and passes its paths as UTF-8, so the messages show the directory name instead of ?.
  • windows_dependency_diagnostics builds its fixtures under a ü日 directory. It drives the stub builders in-process and starts its runner with CreateProcessW, so it does not go through the relinker's arguments.

Tested: Linux relinker ctest 97/97. windows_dependency_diagnostics, cross-compiled with MinGW-w64 GCC 16 and run under Wine: with the ü日 fixtures every check fails on main (dependency diagnostics Windows API failed) and passes with the branch. Its final remove_all of the fixture directory fails under Wine with Access denied even on unchanged main with the ASCII name, so that step needs a Windows run. Under Wine, a test executable converted under unicode, renamed to unicode ü日 and started from another directory runs to its guest entry.

AI-assisted: yes. An AI agent (Claude Code) did most of the work: the code, the tests and this comment.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096603985 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096603985). Originally posted by [justdoston](https://github.com/justdoston) on 2026-10-10T10:33:32Z. --- Thanks both, and @husseinkad for the native Windows run. @husseinkad You're right about the test: the relinker reads its arguments as narrow strings, so on a cp1252 system that case never reached the stub. `bcb8d644` converts it under an ASCII name and renames the directory to `unicode ü日` before starting the executable, as in your table. Reading the relinker's own arguments through the wide command line (`core/relinker/main.cpp`) is a separate fix that I've left out of this branch. @MarcZX100 On the text buffers: the executable has no long-path-aware manifest, so the directory it can enter with `SetCurrentDirectoryW` is limited to `MAX_PATH` and that call fails first. A path whose text is longer than the 32 KiB buffer (now more than about 10,900 non-ASCII UTF-16 units, since the text is UTF-8) stops with the existing `FAIL: executable or library path is too long` rather than overflowing. Sizing the buffers at three bytes per unit would add 64 KiB of file data per library, because they sit before the error strings in `.startup` and the PE writer only trims trailing zeros. I can do that, or move the buffers to the zero tail, if a maintainer prefers. The branch also now covers the `--windows-diagnostics` walker (`4fe56534`), so the TechnicalDebt entry from the first commit is gone: - The walker keeps its paths in UTF-8 and converts them at its Windows calls, which now use `GetModuleHandleW`, `LoadLibraryExW`, `GetFileAttributesW`, `GetModuleFileNameW` and `GetSystemDirectoryW`. The entry stub prints and passes its paths as UTF-8, so the messages show the directory name instead of `?`. - `windows_dependency_diagnostics` builds its fixtures under a `ü日` directory. It drives the stub builders in-process and starts its runner with `CreateProcessW`, so it does not go through the relinker's arguments. Tested: Linux relinker `ctest` 97/97. `windows_dependency_diagnostics`, cross-compiled with MinGW-w64 GCC 16 and run under Wine: with the `ü日` fixtures every check fails on `main` (`dependency diagnostics Windows API failed`) and passes with the branch. Its final `remove_all` of the fixture directory fails under Wine with `Access denied` even on unchanged `main` with the ASCII name, so that step needs a Windows run. Under Wine, a test executable converted under `unicode`, renamed to `unicode ü日` and started from another directory runs to its guest entry. AI-assisted: yes. An AI agent (Claude Code) did most of the work: the code, the tests and this comment.
harmsluis commented 2026-10-10 11:13:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by harmsluis on 2026-10-10T11:13:11Z.


Native Windows run of justdoston:fix/windows-unicode-executable-path at bcb8d644, covering the two points left for a Windows machine (the new windows_working_directory case and the windows_dependency_diagnostics fixture cleanup).

Environment: Windows 11 (10.0.26300), en-US, ANSI code page 1252, WinLibs GCC 15.2.0 r7 (x86_64-ucrt-posix-seh), CMake 4.3.1, Ninja 1.13.2, Python 3.14. Relinker-only Release build, TEMP/TMP set to a separate directory.

Tree Build ctest --test-dir build-relinker
Branch bcb8d644 Passed 93/93
Branch merged onto main b5f5362d (no conflicts) Passed 93/93
  • windows_working_directory: passed, including the case converted under an ASCII name and renamed to unicode ü日.
  • windows_dependency_diagnostics: passed with the ü日 fixtures. The final remove_all that failed under Wine succeeds here; no files are left in the temp directory after the run.
  • input_magic is registered and passes, so the Python tests ran.

Not covered: the relinker's own narrow argv in core/relinker/main.cpp, which the branch leaves out.

AI-assisted: yes. An AI agent ran the build and tests and drafted this comment; I reviewed the results.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096896552 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096896552). Originally posted by [harmsluis](https://github.com/harmsluis) on 2026-10-10T11:13:11Z. --- Native Windows run of `justdoston:fix/windows-unicode-executable-path` at `bcb8d644`, covering the two points left for a Windows machine (the new `windows_working_directory` case and the `windows_dependency_diagnostics` fixture cleanup). Environment: Windows 11 (10.0.26300), en-US, ANSI code page 1252, WinLibs GCC 15.2.0 r7 (x86_64-ucrt-posix-seh), CMake 4.3.1, Ninja 1.13.2, Python 3.14. Relinker-only Release build, `TEMP`/`TMP` set to a separate directory. | Tree | Build | `ctest --test-dir build-relinker` | |---|---|---| | Branch `bcb8d644` | Passed | 93/93 | | Branch merged onto `main` `b5f5362d` (no conflicts) | Passed | 93/93 | - `windows_working_directory`: passed, including the case converted under an ASCII name and renamed to `unicode ü日`. - `windows_dependency_diagnostics`: passed with the `ü日` fixtures. The final `remove_all` that failed under Wine succeeds here; no files are left in the temp directory after the run. - `input_magic` is registered and passes, so the Python tests ran. Not covered: the relinker's own narrow `argv` in `core/relinker/main.cpp`, which the branch leaves out. AI-assisted: yes. An AI agent ran the build and tests and drafted this comment; I reviewed the results.
husseinkad commented 2026-10-10 11:13:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T11:13:53Z.


Thank you @justdoston, and @harmsluis for the second native run. The bcb8d644 change to the test matches what I saw here. I'd like to take the separate piece you left out, reading the relinker's own arguments through the wide command line in core/relinker/main.cpp, as its own change with a test that runs the relinker from a directory with characters outside the ANSI code page. I'll start on it now unless one of you already has it; tell me here if so and I'll leave it to you.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096901880 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096901880). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T11:13:53Z. --- Thank you @justdoston, and @harmsluis for the second native run. The `bcb8d644` change to the test matches what I saw here. I'd like to take the separate piece you left out, reading the relinker's own arguments through the wide command line in `core/relinker/main.cpp`, as its own change with a test that runs the relinker from a directory with characters outside the ANSI code page. I'll start on it now unless one of you already has it; tell me here if so and I'll leave it to you. AI-assisted: yes.
Get-fix commented 2026-10-10 11:22:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-10T11:22:28Z.


Native Windows run of justdoston:fix/windows-unicode-executable-path at bcb8d644 (merges cleanly onto main b5f5362d). Windows 11 Pro 10.0.26200, ANSI code page 1252, WinLibs GCC 15.2.0 r7, relinker-only Release build.

The two updated tests pass on native Windows, including the fixture cleanup that failed under Wine: windows_dependency_diagnostics (fixtures under ü日) and windows_working_directory (with the unicode ü日 case). No ü/日 fixture directories were left in %TEMP%.

Full relinker ctest: 92 of 93 on the branch and 92 of 93 on main b5f5362d. The one failure is the same on both: tls_function_coverage_register_address_loads times out at 30 s under --parallel 8; run alone it passes in 14.9 s on main and 15.8 s on the branch.

A converted test_windows_import_modules executable (exit 11 once the guest entry runs), converted in an ASCII directory, copied to each directory and started from another directory:

directory main b5f5362d branch bcb8d644
ascii 11 11
José 11 11
عربي 0xc000000d, FAIL: cannot make the executable directory the current directory 11
日本 same 11
game 🎮 same 11

--windows-diagnostics on the branch from a عربي 🎮 directory: the resolved case exits 11 and the Loading PRX: lines show the directory name as is (no ?); an unresolved import stops with FAIL: unresolved ELF import absent from a.prx and 0xc0000139, with the same path.

ps5-doom (PPSA99666 v1.1.1, --windows --windows-gui), converted in an ASCII directory, copied into a directory named عربي and started with Start-Process from another directory: main b5f5362d exits with 0xc000000d; the branch runs and the DOOM window renders.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096974479 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6096974479). Originally posted by [Get-fix](https://github.com/Get-fix) on 2026-10-10T11:22:28Z. --- Native Windows run of `justdoston:fix/windows-unicode-executable-path` at bcb8d644 (merges cleanly onto `main` b5f5362d). Windows 11 Pro 10.0.26200, ANSI code page 1252, WinLibs GCC 15.2.0 r7, relinker-only Release build. **The two updated tests pass on native Windows**, including the fixture cleanup that failed under Wine: `windows_dependency_diagnostics` (fixtures under `ü日`) and `windows_working_directory` (with the `unicode ü日` case). No `ü`/`日` fixture directories were left in `%TEMP%`. **Full relinker ctest:** 92 of 93 on the branch and 92 of 93 on `main` b5f5362d. The one failure is the same on both: `tls_function_coverage_register_address_loads` times out at 30 s under `--parallel 8`; run alone it passes in 14.9 s on `main` and 15.8 s on the branch. **A converted `test_windows_import_modules` executable** (exit 11 once the guest entry runs), converted in an ASCII directory, copied to each directory and started from another directory: | directory | `main` b5f5362d | branch bcb8d644 | |---|---|---| | `ascii` | 11 | 11 | | `José` | 11 | 11 | | `عربي` | `0xc000000d`, `FAIL: cannot make the executable directory the current directory` | 11 | | `日本` | same | 11 | | `game 🎮` | same | 11 | **`--windows-diagnostics` on the branch** from a `عربي 🎮` directory: the resolved case exits 11 and the `Loading PRX:` lines show the directory name as is (no `?`); an unresolved import stops with `FAIL: unresolved ELF import absent from a.prx` and `0xc0000139`, with the same path. **ps5-doom** (PPSA99666 v1.1.1, `--windows --windows-gui`), converted in an ASCII directory, copied into a directory named `عربي` and started with `Start-Process` from another directory: `main` b5f5362d exits with `0xc000000d`; the branch runs and the DOOM window renders. AI-assisted: yes (Claude Code).
MarcZX10 commented 2026-10-10 11:31:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T11:31:41Z.


Update: native Windows validation for the #2692 branch

A native Windows run is now reported in #2692 for justdoston's f87686c2 branch, based on current main b5f5362d.

Scope Native Windows result
#2640 branch bcb8d644 Its Unicode working-directory and dependency-diagnostics changes were tested natively in the earlier Windows run.
#2692 branch f87686c2 Relinker CTest 94/94; file_unicode_path passes; windows_import_modules converts from José and other Unicode paths.
#2692 + #2640 The José, Arabic, Japanese and emoji directory cases convert and reach the guest entry. The report also says DOOM renders from an Arabic path with both changes.

The run reports the expected distinction: #2692 fixes the relinker's own wide arguments and file paths, while #2640 fixes startup working-directory and dependency-path handling inside the converted executable. The two branches were tested together without conflicts. This updates my earlier note that native Windows evidence for #2692 was still pending. Both changes remain linked from issues rather than open PRs while intake is paused.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097047888 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6097047888). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T11:31:41Z. --- ## Update: native Windows validation for the #2692 branch A native Windows run is now reported in [#2692](https://github.com/boykopovar/AnyPS5/issues/2692#issuecomment-6097071032) for justdoston's `f87686c2` branch, based on current `main` `b5f5362d`. | Scope | Native Windows result | |---|---| | #2640 branch `bcb8d644` | Its Unicode working-directory and dependency-diagnostics changes were tested natively in the earlier Windows run. | | #2692 branch `f87686c2` | Relinker CTest 94/94; `file_unicode_path` passes; `windows_import_modules` converts from `José` and other Unicode paths. | | #2692 + #2640 | The `José`, Arabic, Japanese and emoji directory cases convert and reach the guest entry. The report also says DOOM renders from an Arabic path with both changes. | The run reports the expected distinction: #2692 fixes the relinker's own wide arguments and file paths, while #2640 fixes startup working-directory and dependency-path handling inside the converted executable. The two branches were tested together without conflicts. This updates my earlier note that native Windows evidence for #2692 was still pending. Both changes remain linked from issues rather than open PRs while intake is paused.
husseinkad commented 2026-10-10 11:32:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T11:32:52Z.


Thank you @MarcZX100, you are right: @justdoston's f87686c2 (#2692) predates my offer and covers the same ground, and I had missed that issue. I'm dropping my own main.cpp change and will not open a PR for it. Their branch also handles --autorun through _wsystem, which mine left as a documented gap. What I can add instead is a native Windows run of f87686c2 (the issue says it has only been checked under Wine); I'll post that result on #2692.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097057032 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2640#issuecomment-6097057032). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T11:32:52Z. --- Thank you @MarcZX100, you are right: @justdoston's `f87686c2` (#2692) predates my offer and covers the same ground, and I had missed that issue. I'm dropping my own `main.cpp` change and will not open a PR for it. Their branch also handles `--autorun` through `_wsystem`, which mine left as a documented gap. What I can add instead is a native Windows run of `f87686c2` (the issue says it has only been checked under Wine); I'll post that result on #2692. AI-assisted: yes.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#2640
No description provided.