Skip to content
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

Fix & test for issue #4288 (unicode surrogate character in Python exception message). #4297

Merged
merged 4 commits into from
Oct 31, 2022

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Oct 31, 2022

Description

Closes #4288. See there for background.

While at it:

Suggested changelog entry:

Bug fix: Unicode surrogate character in Python exception message leads to process termination in `error_already_set::what()`.

@rwgk rwgk marked this pull request as ready for review October 31, 2022 00:43
@henryiii
Copy link
Collaborator

henryiii commented Oct 31, 2022

PyPy 3.7 Windows gave:

MSBuild version 17.3.1+2badb37d1 for .NET Framework
  Checking File Globs
  cross_module_gil_utils.vcxproj -> D:\a\pybind11\pybind11\build2\tests\cross_module_gil_utils.pypy37-pp73-win_amd64.pyd
  cross_module_interleaved_error_already_set.vcxproj -> D:\a\pybind11\pybind11\build2\tests\cross_module_interleaved_error_already_set.pypy37-pp73-win_amd64.pyd
  pybind11_cross_module_tests.vcxproj -> D:\a\pybind11\pybind11\build2\tests\pybind11_cross_module_tests.pypy37-pp73-win_amd64.pyd
  pybind11_tests.vcxproj -> D:\a\pybind11\pybind11\build2\tests\pybind11_tests.pypy37-pp73-win_amd64.pyd
  ------ pybind11_tests.pypy37-pp73-win_amd64.pyd file size: 23571968 (no change)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'D:\a\pybind11\pybind11\build2\CMakeFiles\c74e89d6f5f1ea108a7628c93f4b5083\pytest.rule;D:\a\pybind11\pybind11\tests\CMakeLists.txt' exited with code -1073741819. [D:\a\pybind11\pybind11\build2\tests\pytest.vcxproj]

That's the expected flake, or something else? Either way, I can rerun. You can access old runs at the top of the checks screen, there's a selectable run number there.

@rwgk
Copy link
Collaborator Author

rwgk commented Oct 31, 2022

PyPy 3.7 Windows gave:
That's the expected flake, or something else?

Something else. I've seen it for the first time 2-3 months ago. I don't know what's behind it, at all. But clearly not related to this PR.

@henryiii henryiii merged commit 3a2c96b into pybind:master Oct 31, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Oct 31, 2022
@rwgk rwgk deleted the error_already_set_unicode_surrogate branch October 31, 2022 18:01
henryiii added a commit that referenced this pull request Oct 31, 2022
* Fix & test for issue #4288 (unicode surrogate character in Python exception message).

* DRY `message_unavailable_exc`

* fix: add a constexpr

Co-authored-by: Aaron Gokaslan <[email protected]>

* style: pre-commit fixes

Co-authored-by: Henry Schreiner <[email protected]>
Co-authored-by: Aaron Gokaslan <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Oct 31, 2022
rwgk pushed a commit that referenced this pull request Nov 18, 2022
* Fix & test for issue #4288 (unicode surrogate character in Python exception message).

* DRY `message_unavailable_exc`

* fix: add a constexpr

Co-authored-by: Aaron Gokaslan <[email protected]>

* style: pre-commit fixes

Co-authored-by: Henry Schreiner <[email protected]>
Co-authored-by: Aaron Gokaslan <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Bug: exception in noexcept what() when Python exception contains a surrogate character
3 participants