-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-run-makeArea: port run-make Makefiles to rmake.rsArea: port run-make Makefiles to rmake.rsC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
Some intended-to-fail run-make tests on Windows will spam a bunch of Windows Error Reporting (WER) error dialogues because failing to find DLLs and such. However, nobody else ran into this because it has three necessary conditions to trigger:
- You need to be using a terminal emulator that's not Windows Terminal™.
- Windows Terminal has a bug Windows terminal does not show missing dll popup microsoft/terminal#9788 (probably still not fixed?) where it ate the WER error dialogues.
- ... and I recently switched to wezterm.
- You also need to be using a sufficiently new version of PowerShell.
- My system's default powershell version was PowerShell 5 (probably same for other people using current versions of Windows 11).
- Recent PowerShell 7 versions seems to have fixed a bug with PowerShell (or rather, changed the behavior of) also not properly displaying WER error dialogues like
cmd.exe
or File Explorer: Configurable behavior on critical error: message on Error stream or pop-up dialog PowerShell/PowerShell#16468. - ... and I recently tried to use PowerShell v7.
- Oh, and you have to be using "native" Windows msvc (not msys2 or windows-gnu) and running the
run-make
test suite. Not many contributors do in the first place.
compiletest
has a mitigation for this:
rust/src/tools/compiletest/src/runtest.rs
Lines 70 to 80 in b8bb296
// Tell Windows to not show any UI on errors (such as terminating abnormally). | |
// This is important for running tests, since some of them use abnormal | |
// termination by design. This mode is inherited by all child processes. | |
unsafe { | |
let old_mode = SetErrorMode(SEM_NOGPFAULTERRORBOX); // read inherited flags | |
let old_mode = THREAD_ERROR_MODE(old_mode); | |
SetErrorMode(old_mode | SEM_NOGPFAULTERRORBOX); | |
let r = f(); | |
SetErrorMode(old_mode); | |
r | |
} |
However, this seems to be missing a SEM_FAILCRITICALERRORS
flag.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-run-makeArea: port run-make Makefiles to rmake.rsArea: port run-make Makefiles to rmake.rsC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)