Commit 29e41b1
committed
[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.1 parent cca454b commit 29e41b1
File tree
2 files changed
+5
-5
lines changed- libcxx/test
- std/containers/sequences/vector
- support
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
0 commit comments