diff options
| author | Martin Storsjö <martin@martin.st> | 2021-07-13 12:49:19 +0000 |
|---|---|---|
| committer | Martin Storsjö <martin@martin.st> | 2021-07-15 23:37:56 +0300 |
| commit | 6596778b46ba69517191e7397289228168064ff4 (patch) | |
| tree | 12af02d0fa577930d480b4916be893f0df9ef808 /lldb/test/API/python_api/process/main.cpp | |
| parent | c97cb11efdfacff6231ee058b413df252a8be0d9 (diff) | |
[libcxx] [test] Fix mismatches between aligned operator new and std::free
The XFAIL comments about VCRuntime not providing aligned operator new
are outdated; these days VCRuntime does provide them.
However, the tests used to fail on Windows, as the pointers allocated
with an aligned operator new (which is implemented with _aligned_malloc
on Windows) can't be freed using std::free() on Windows (but they need
to be freed with the corresponding function _aligned_free instead).
Instead override the aligned operator new to return a dummy suitably
aligned pointer instead, like other tests that override aligned operator
new.
Also override `operator delete[]` instead of plain `operator delete`
in the array testcase; the fallback from `operator delete[]` to
user defined `operator delete` doesn't work in all DLL build
configurations on Windows.
Also expand the TEST_NOEXCEPT macros, as these tests only are built
in C++17 mode.
By providing the aligned operator new within the tests, this also makes
these test cases pass when testing back deployment on macOS 10.9.
Differential Revision: https://reviews.llvm.org/D105962
Diffstat (limited to 'lldb/test/API/python_api/process/main.cpp')
0 files changed, 0 insertions, 0 deletions
