Fix libfuzzer detection and shared object symbols issues

Don't export __throw_length_error, and don't import abort
This commit is contained in:
2024-01-19 18:18:40 -08:00
parent b1e3ab2020
commit 5e4a946bdb
3 changed files with 15 additions and 4 deletions

View File

@@ -152,7 +152,7 @@ template <class T> struct ArenaAlloc {
[[nodiscard]] T *allocate(size_t n) {
if (n > 0xfffffffffffffffful / sizeof(T)) { // NOLINT
abort();
__builtin_unreachable();
}
return static_cast<T *>((void *)new (std::align_val_t(alignof(T)), *arena)
@@ -1136,7 +1136,7 @@ __attribute__((__visibility__("default"))) void ConflictSet_destroy(void *cs) {
}
namespace std {
void __throw_length_error(const char *) { abort(); }
void __throw_length_error(const char *) { __builtin_unreachable(); }
} // namespace std
namespace {