Skip to content

Enhance WindowsErrorPopupBlocker for run-time check failures. - #282

Merged
jhmgoossens merged 1 commit into
coin-or:masterfrom
jhmgoossens:dev-make-test-master
Oct 31, 2026
Merged

jhmgoossens merged 1 commit into
coin-or:masterfrom
jhmgoossens:dev-make-test-master

Conversation

@jhmgoossens

@jhmgoossens jhmgoossens commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

As described in Cbc issues 792, some error popups still got through during the running of tests on Debug builds for Windows. This would block and eventually timeout Windows CI builds.

This PR enhances the WindowsErrorPopupBlocker by adding an additional hook for the CRT debug reporting system to print messages to stderr and abort.

To reproduce the issue fixed in this PR, build MSVC binaries in debug mode and use the following code snippet

int i;
std::sscanf("123", "%lf", &i);

Without this PR, such a debug build in MSVC of the above code would correctly result in a runtime exception Run-Time Check Failure #2 - Stack around the variable 'i' was corrupted. because 'This caused the final "%lf" (8 bytes) to be written through the &i pointer (a 4-byte int on the stack), overflowing the stack frame.'. See also Commit b4e185d.

@jhmgoossens jhmgoossens self-assigned this Oct 31, 2026
@jhmgoossens
jhmgoossens merged commit 0f546f8 into coin-or:master Oct 31, 2026
14 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.

1 participant