Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Change: Other Merge Risk:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
guest_libstdcxx_dll_throws_badallocfails on every run on macOS:std::bad_alloc from the runtime DLL was not caught by type. No exception is thrown at all.AllocateTooManyhas internal linkage and its result was discarded withstatic_cast<void>, so clang drops the unused return value and then the allocation itself, which libc++ makes through__builtin_operator_newand therefore allows it to elide. libstdc++ throws from itsPTRDIFF_MAXcheck before allocating, which is why the mode passes with GCC.The check now stores the result in a
volatilepointer, so the allocation stays and throws with either runtime.Tested
macOS 27.0.1, Apple M4, x86_64 Release under Rosetta 2, Apple clang 21.0.0, on
main1b8f79a5b5plus boykopovar#26739, boykopovar#27739 and boykopovar#17425, which macOS needs to build (none touches this test; the file is unchanged up to81ad4d40c5):guest_libstdcxx_dll_throws_badalloc: 20/20. Without the change: fails on every run with the message above.guest_libstdcxx_dll_throws_*modes pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit