Fix macOS allocator-boundary crash in monolithic Unreal builds - #51
Open
Gogoshika-ga wants to merge 4 commits into
Open
Fix macOS allocator-boundary crash in monolithic Unreal builds#51Gogoshika-ga wants to merge 4 commits into
Gogoshika-ga wants to merge 4 commits into
Conversation
Keeps their allocations inside the SDK binary instead of libc++.1.dylib, fixing allocator mismatch crashes in hosts with private operator new/delete (monolithic Unreal).
libc++'s std::thread frees its TLS block inside libc++.1.dylib, crashing hosts with private operator new/delete. GAHTTPApi's std::async was effectively synchronous; run it inline.
std::to_string(double) allocates inside libc++.1.dylib.
Runtime test with private operator new/delete, plus an nm check that no libc++ string/stringstream members are imported.
Gogoshika-ga
force-pushed
the
fix/mac-libcxx-allocator-boundary
branch
from
August 27, 2026 11:18
fd22ef1 to
bed99c0
Compare
LCOV of commit
|
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.
On macOS, libc++ string/stringstream/thread code lives in
libc++.1.dyliband uses the system allocator. Hosts with privateoperator new/delete(monolithic Unreal) then crash with Attempt to free an unrecognized pointer.std::string/stringstreamtemplates in the SDK (Apple only)GAThread: pthread-backed thread on Apple;std::threadelsewheresnprintfinstead ofstd::to_string(double)inGAValidatornmcheck for libc++ string imports🤖 Generated with Claude Code