Skip to content

Synthesize Windows temp env vars#135

Open
miried wants to merge 1 commit into
decompals:mainfrom
miried:tmpdir-fix
Open

Synthesize Windows temp env vars#135
miried wants to merge 1 commit into
decompals:mainfrom
miried:tmpdir-fix

Conversation

@miried

@miried miried commented Jul 3, 2026

Copy link
Copy Markdown

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.

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.
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.

1 participant