Skip to content

Fix C++ exception throwing behavior for the new operator when the new handler throws an exception with a type derived from std::bad_alloc#361

Merged
thestinger merged 1 commit into
GrapheneOS:mainfrom
rdevshp:cpp_exc_handle
Jul 5, 2026
Merged

Fix C++ exception throwing behavior for the new operator when the new handler throws an exception with a type derived from std::bad_alloc#361
thestinger merged 1 commit into
GrapheneOS:mainfrom
rdevshp:cpp_exc_handle

Conversation

@rdevshp

@rdevshp rdevshp commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

A handler function registered by std::set_new_handler can throw exceptions of type derived from std::bad_alloc.

This PR fixes the exception throwing behavior of the new operator when a new handler registered with std::set_new_handler throws an exception derived from std::bad_alloc.

… handler throws an exception with a type derived from std::bad_alloc
@thestinger thestinger merged commit f18492f into GrapheneOS:main Jul 5, 2026
12 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.

2 participants