You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[libcxx] [test] Use ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS in more places
ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS allows waiving asserts,
for cases when we can't count allocations that happen within
the libc++ shared library.
When compiling with optimization, it is possible that some calls
end up generated inline, where the overridden operator new/delete
do get called (counting those calls), whereas the compiler may
decide to leave some calls to the external definition (inside the
shared library, where we can't count the calls).
In particular, in one case, a non-optimized build calls
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
from the DLL, while it gets inlined (including direct calls to
operator delete) when built with optimization.
Therefore; for the cases where we can't count allocations
internally within the library, waive these asserts.
This fixes all testcases in mingw mode, when built with optimization
enabled.
0 commit comments