diff --git a/src/snmalloc/mem/corealloc.h b/src/snmalloc/mem/corealloc.h index 127abc76a..b9d63c957 100644 --- a/src/snmalloc/mem/corealloc.h +++ b/src/snmalloc/mem/corealloc.h @@ -656,7 +656,8 @@ namespace snmalloc smallsizeclass_t sizeclass, freelist::Iter<>* fl, size_t size) SNMALLOC_FAST_PATH_LAMBDA { - return alloc->small_refill(sizeclass, *fl, size); + return alloc->template small_refill( + sizeclass, *fl, size); }, this, sizeclass, @@ -693,7 +694,7 @@ namespace snmalloc // Deal with alloc zero of with a small object here. // Alternative semantics giving nullptr is also allowed by the // standard. - return self->small_alloc(1); + return self->template small_alloc(1); } return self->template handle_message_queue( @@ -891,7 +892,7 @@ namespace snmalloc return ticker.check_tick(r); }, [](Allocator* a, size_t size) SNMALLOC_FAST_PATH_LAMBDA { - return a->small_alloc(size); + return a->template small_alloc(size); }, size); } diff --git a/src/test/snmalloc_testlib.cc b/src/test/snmalloc_testlib.cc index c99f0e569..f57334e3c 100644 --- a/src/test/snmalloc_testlib.cc +++ b/src/test/snmalloc_testlib.cc @@ -174,6 +174,12 @@ namespace snmalloc { Aal::pause(); } + + // Force-emit message_impl's COMDAT here so testlib-only tests (redblack, + // seqset) that see only its non-inline declaration can link. volatile keeps + // the odr-use non-elidable. + [[maybe_unused]] static void (*volatile force_message_impl)( + const char* const) = &message_impl; } // namespace snmalloc // -- override/malloc.cc symbols with testlib_ prefix -----------------------