Skip to content

run-make tests on Windows (wezterm + recent PowerShell 7) triggers Windows Error Reporting error dialogues #132092

Closed
@jieyouxu

Description

@jieyouxu

Image

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:

  1. You need to be using a terminal emulator that's not Windows Terminal™.
  2. You also need to be using a sufficiently new version of PowerShell.
  3. 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:

// 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 RustA-run-makeArea: port run-make Makefiles to rmake.rsC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions