[libcxx-commits] [PATCH] D105910: [SystemZ][z/OS][libcxx] Mark tests that require runtime linking as unsupported on z/OS

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 13 12:32:15 PDT 2021


mstorsjo added a comment.

> Notably, if a call to new or delete is compiled as part of a shared library, it is impossible for an application to change which definition that call invokes. This includes calls compiled as part of the standard library.
>
> Many tests rely on user-defined new and delete operators to count allocations. Any such tests will not work on z/OS.

FWIW, Windows also has this same situation (where operator new/delete in the executable can't override operator new/delete in the already linked libc++ DLL).

But opting out of the whole tests is a bit overkill IMO. For the Windows/DLL situation, we have finegrained macros that omit exactly those checks of the tests while keeping the rest of the tests running. I think it would be much better to generalize those existing macros to something platform independent.



================
Comment at: libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp:48
     // operator for calls within the libc++ DLL.
     TEST_NOT_WIN32_DLL(assert(globalMemCounter.checkDeleteArrayCalledEq(1)));
 
----------------
Here's an example on how this aspect only is waived in the Windows/DLL configuration.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105910/new/

https://reviews.llvm.org/D105910



More information about the libcxx-commits mailing list