Repository navigation
Make c-abi exhaustive and fix C++ operator new handler paths - #2
Merged
Merged
Conversation
Require every exported libc alias and Itanium new/delete symbol, deny all MI_OVERRIDE_LIBC_EXTRAS names, add an ABI_PROFILE for jemalloc, call the aliases under LD_PRELOAD (aliases.c, libc-only chaos, preloaded cxx), and run c-abi on musl. Throwing operator new now raises bad_alloc with no handler instead of _exit, and nothrow forms no longer let a handler's exception escape noexcept.
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.
Summary
nm -Dmust show all 38 exported symbols (malloc family, libc aliases, Itanium new/delete), and none of the 14MI_OVERRIDE_LIBC_EXTRASnames (addsstrndup,reallocf,__libc_calloc,__libc_memalign, ...).ABI_PROFILE=libcfor jemalloc.rust/tests/aliases.c(+interpose.h), libc-onlychaosunderLD_PRELOAD,cxxlinked and preloaded with throwing/nothrow/array/aligned/sized new and delete.DT_NEEDED libc.so.6check with a no-glibc check soc-abiruns there.operator newwith no handler now throwsbad_alloc(was_exit(1)); nothrow forms no longer let a handler exception escapenoexcept.Testing
Verified locally (Rust 1.99.1): cargo test -p elymalloc-core --release (117/117) and -p elymalloc-harness pass on this branch alone. c-abi passes for rewrite (default, secure), C mimalloc and jemalloc on glibc, and for both rewrite cdylibs on musl. A fake DSO exporting only
mi_mallocfails. Note: C mimalloc (built as C) aborts in the new throwing-new case; the oracle tolerates C-only failures.