Skip to content

Synthesize Windows temp env vars#135

Merged
encounter merged 2 commits into
decompals:mainfrom
miried:tmpdir-fix
Jul 11, 2026
Merged

Synthesize Windows temp env vars#135
encounter merged 2 commits into
decompals:mainfrom
miried:tmpdir-fix

Conversation

@miried

@miried miried commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

LINK.EXE expects Windows-style TMP/TEMP variables when choosing a scratch path for CVTRES. On macOS wibo only inherited TMPDIR, so the linker called GetTempFileNameW with a null path and later crashed the host in WideCharToMultiByte while converting that null pointer.

Expose TMP and TEMP from TMPDIR with a /tmp fallback, convert them to Windows paths in the environment APIs, and harden the ANSI/wide conversion shims so invalid guest pointers return ERROR_INVALID_PARAMETER instead of segfaulting wibo. Add regression coverage for the synthesized temp variables and null conversion inputs.

miried and others added 2 commits July 3, 2026 14:13
LINK.EXE expects Windows-style TMP/TEMP variables when choosing a scratch path for CVTRES. On macOS wibo only inherited TMPDIR, so the linker called GetTempFileNameW with a null path and later crashed the host in WideCharToMultiByte while converting that null pointer.

Expose TMP and TEMP from TMPDIR with a /tmp fallback, convert them to Windows paths in the environment APIs, and harden the ANSI/wide conversion shims so invalid guest pointers return ERROR_INVALID_PARAMETER instead of segfaulting wibo. Add regression coverage for the synthesized temp variables and null conversion inputs.
@encounter
encounter merged commit 01280cd into decompals:main Jul 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants