-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error dialog causes process to hang #16849
Comments
Indeed, it is undocumented. If I pass e.g.
Now one might think this is an errenous assertion, but there seems to be special support; from what I can tell it works
Not really. The dialogs are about the inevitable error after an assertion failure where I think it's probably best to choose a minimal solution as bug fix (i.e. add |
Well, it's likely the best memory leak detector available for MSVC builds (might find a couple of other memory related issues, but ASan is far superior). Set |
If `_DEBUG` is set, assertion failures and errors are directed to a debug message window by default[1]. That causes a process to hang, since these dialogs are modal. While we already cater to assertion failures, errors have apparently been overlooked. We choose a minimal fix for BC reasons; although passing `0` as `reportMode` is undocumented, it obviously works fine for a long time. We may consider to improve on this for the `master` branch. [1] <https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetreportmode>
Ah, I hadn't realized there was a difference. |
Description
php-src/main/main.c
Lines 2121 to 2122 in dd4fc9a
This doesn't appear to produce the desired effect in latest versions of PHP. Dialog asserts are still generated during tests.
From my brief research it doesn't appear that
0
is a valid input for this function.The better approach would probably be to redirect the output to stderr, as is done here when PHP_WIN32_HEAP_DEBUG is set:
php-src/sapi/cli/php_cli.c
Lines 1181 to 1186 in dd4fc9a
However, setting PHP_WIN32_HEAP_DEBUG enables a bunch of other stuff that isn't necessarily wanted.
This bug is problematic because it causes tests on Windows CIs to get stuck when asserts are triggered in debug builds.
PHP Version
8.1, 8.2, 8.3
Operating System
Windows
The text was updated successfully, but these errors were encountered: