| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513) This is a followup from this discussion https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017 to mark targets that were initially marked as UNSUPPORTED with an XFAIL instead. | 2 年前 | |
[libc++] Fix noexcept behaviour of operator new helper functions (#74337) This patch removes the noexcept specifier introduced in #69407 since the Standard allows a new handler to throw an exception of type bad_alloc (or derived from it). With the noexcept specifier on the helper functions, we would immediately terminate the program. The patch also adds tests for the case that had regressed. Co-authored-by: Alison Zhang <alisonzhang@ibm.com> | 2 年前 | |
[libc++] Complete refactor of tests for operator new I stumbled upon the operator new and operator new[] tests while investigating an issue with operator new when exceptions are disabled, and I realized that our test coverage was incomplete. This patch refactors all the operator new and operator new[] tests to add consistency and better coverage for scenarios in which it should be possible to override an operator indirectly by defining another one (for example new(size_t, nothrow) should use new(size_t) if it has been provided). This is intended to be a NFC setting up the terrain for some refactoring work and bug fix in operator new. Differential Revision: https://reviews.llvm.org/D150408 | 3 年前 | |
[libc++] Allow running the test suite with optimizations (#68753) This patch adds a configuration of the libc++ test suite that enables optimizations when building the tests. It also adds a new CI configuration to exercise this on a regular basis. This is added in the context of [1], which requires building with optimizations in order to hit the bug. [1]: https://github.com/llvm/llvm-project/issues/68552 | 2 年前 | |
[libc++] Allow running the test suite with optimizations (#68753) This patch adds a configuration of the libc++ test suite that enables optimizations when building the tests. It also adds a new CI configuration to exercise this on a regular basis. This is added in the context of [1], which requires building with optimizations in order to hit the bug. [1]: https://github.com/llvm/llvm-project/issues/68552 | 2 年前 | |
[SystemZ][z/OS][libcxx] mark aligned allocation tests XFAIL on z/OS (#80735) zOS doesn't support aligned allocation, so mark these testcases as unsupported. Continuation of https://reviews.llvm.org/D102798 | 2 年前 | |
[libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513) This is a followup from this discussion https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017 to mark targets that were initially marked as UNSUPPORTED with an XFAIL instead. | 2 年前 | |
[libc++] Improve libc++ tests when using optimizations (#88897) Some tests were missing DoNotOptimize annotations. | 2 年前 | |
[libc++] Improve libc++ tests when using optimizations (#88897) Some tests were missing DoNotOptimize annotations. | 2 年前 | |
[SystemZ][z/OS][libcxx] mark aligned allocation tests XFAIL on z/OS (#80735) zOS doesn't support aligned allocation, so mark these testcases as unsupported. Continuation of https://reviews.llvm.org/D102798 | 2 年前 | |
[libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513) This is a followup from this discussion https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017 to mark targets that were initially marked as UNSUPPORTED with an XFAIL instead. | 2 年前 | |
[libc++] Improve libc++ tests when using optimizations (#88897) Some tests were missing DoNotOptimize annotations. | 2 年前 | |
[libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513) This is a followup from this discussion https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017 to mark targets that were initially marked as UNSUPPORTED with an XFAIL instead. | 2 年前 | |
[libc++] Fix noexcept behaviour of operator new helper functions (#74337) This patch removes the noexcept specifier introduced in #69407 since the Standard allows a new handler to throw an exception of type bad_alloc (or derived from it). With the noexcept specifier on the helper functions, we would immediately terminate the program. The patch also adds tests for the case that had regressed. Co-authored-by: Alison Zhang <alisonzhang@ibm.com> | 2 年前 | |
[libc++] Complete refactor of tests for operator new I stumbled upon the operator new and operator new[] tests while investigating an issue with operator new when exceptions are disabled, and I realized that our test coverage was incomplete. This patch refactors all the operator new and operator new[] tests to add consistency and better coverage for scenarios in which it should be possible to override an operator indirectly by defining another one (for example new(size_t, nothrow) should use new(size_t) if it has been provided). This is intended to be a NFC setting up the terrain for some refactoring work and bug fix in operator new. Differential Revision: https://reviews.llvm.org/D150408 | 3 年前 | |
[libc++] Fix the behavior of throwing operator new under -fno-exceptions (#69498) In D144319, Clang tried to land a change that would cause some functions that are not supposed to return nullptr to optimize better. As reported in https://reviews.llvm.org/D144319#4203982, libc++ started seeing failures in its CI shortly after this change was landed. As explained in D146379, the reason for these failures is that libc++'s throwing operator new can in fact return nullptr when compiled with exceptions disabled. However, this contradicts the Standard, which clearly says that the throwing version of operator new(size_t) should never return nullptr. This is actually a long standing issue. I've previously seen a case where LTO would optimize incorrectly based on the assumption that operator new doesn't return nullptr, an assumption that was violated in that case because libc++.dylib was compiled with -fno-exceptions. Unfortunately, fixing this is kind of tricky. The Standard has a few requirements for the allocation functions, some of which are impossible to satisfy under -fno-exceptions: 1. operator new(size_t) must never return nullptr 2. operator new(size_t, nothrow_t) must call the throwing version and return nullptr on failure to allocate 3. We can't throw exceptions when compiled with -fno-exceptions In the case where exceptions are enabled, things work nicely. new(size_t) throws and new(size_t, nothrow_t) uses a try-catch to return nullptr. However, when compiling the library with -fno-exceptions, we can't throw an exception from new(size_t), and we can't catch anything from new(size_t, nothrow_t). The only thing we can do from new(size_t) is actually abort the program, which does not make it possible for new(size_t, nothrow_t) to catch something and return nullptr. This patch makes the following changes: 1. When compiled with -fno-exceptions, the throwing version of operator new will now abort on failure instead of returning nullptr on failure. This resolves the issue that the compiler could mis-compile based on the assumption that nullptr is never returned. This constitutes an API and ABI breaking change for folks compiling the library with -fno-exceptions (which is not the general public, who merely uses libc++ headers but use a shared library that has already been compiled). This should mostly impact vendors and other folks who compile libc++.dylib themselves. 2. When the library is compiled with -fexceptions, the nothrow version of operator new has no change. When the library is compiled with -fno-exceptions, the nothrow version of operator new will now check whether the throwing version of operator new has been overridden. If it has not been overridden, then it will use an implementation equivalent to that of the throwing operator new, except it will return nullptr on failure to allocate (instead of terminating). However, if the throwing operator new has been overridden, it is now an error NOT to also override the nothrow operator new. Indeed, there is no way for us to implement a valid nothrow operator new without knowing the exact implementation of the throwing version. In summary, this change will impact people who fall into the following intersection of conditions: - They use the libc++ shared/static library built with -fno-exceptions - They do not override operator new(..., std::nothrow_t) - They override operator new(...) (the throwing version) - They use operator new(..., std::nothrow_t) We believe this represents a small number of people. Fixes #60129 rdar://103958777 Differential Revision: https://reviews.llvm.org/D150610 | 2 年前 | |
[libc++] Allow running the test suite with optimizations (#68753) This patch adds a configuration of the libc++ test suite that enables optimizations when building the tests. It also adds a new CI configuration to exercise this on a regular basis. This is added in the context of [1], which requires building with optimizations in order to hit the bug. [1]: https://github.com/llvm/llvm-project/issues/68552 | 2 年前 | |
[libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513) This is a followup from this discussion https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017 to mark targets that were initially marked as UNSUPPORTED with an XFAIL instead. | 2 年前 | |
[libc++] Divorce the std Lit feature from the -std=XXX compiler flag After this patch, we can use --param std=c++20 even if the compiler only supports -std=c++2a. The test suite will handle that for us. The only Lit feature that isn't fully baked will always be the "in development" one, since we don't know exactly what year the standard will be ratified in. This is another take on https://reviews.llvm.org/D99789. Differential Revision: https://reviews.llvm.org/D100210 | 5 年前 | |
[libc++][test] XFAIL sized deallocation tests for AIX, z/OS, and MinGW (#98960) The sized deallocation test cases fail on AIX, z/OS, and MinGW because they default to -fno-sized-deallocation. This patch XFAILs these test cases for the affected targets. Once they change the default, we will get unexpectedly pass. | 1 年前 | |
Support tests in freestanding Summary: Freestanding is *weird*. The standard allows it to differ in a bunch of odd manners from regular C++, and the committee would like to improve that situation. I'd like to make libc++ behave better with what freestanding should be, so that it can be a tool we use in improving the standard. To do that we need to try stuff out, both with "freestanding the language mode" and "freestanding the library subset". Let's start with the super basic: run the libc++ tests in freestanding, using clang as the compiler, and see what works. The easiest hack to do this: In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding'] Run the tests and they all fail. Why? Because in freestanding main isn't special. This "not special" property has two effects: main doesn't get mangled, and main isn't allowed to omit its return statement. The first means main gets mangled and the linker can't create a valid executable for us to test. The second means we spew out warnings (ew) and the compiler doesn't insert the return we omitted, and main just falls of the end and does whatever undefined behavior (if you're luck, ud2 leading to non-zero return code). Let's start my work with the basics. This patch changes all libc++ tests to declare main as int main(int, char** so it mangles consistently (enabling us to declare another extern "C" main for freestanding which calls the mangled one), and adds return 0; to all places where it was missing. This touches 6124 files, and I apologize. The former was done with The Magic Of Sed. The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed This works for most tests, though I did have to adjust a few places when e.g. the test runs with -x c, macros are used for main (such as for the filesystem tests), etc. Once this is in we can create a freestanding bot which will prevent further regressions. After that, we can start the real work of supporting C++ freestanding fairly well in libc++. <rdar://problem/47754795> Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits Differential Revision: https://reviews.llvm.org/D57624 llvm-svn: 353086 | 7 年前 | |
[libc++] Clean up and update deployment target features (#96312) This patch removes many annotations that are not relevant anymore since we don't support or test back-deploying to macOS < 10.13. It also cleans up raw usage of target triples to identify versions of dylibs shipped on prior versions of macOS, and uses the target-agnostic Lit features instead. Finally, it reorders both the Lit backdeployment features and the corresponding availability macros in the library in a way that makes more sense, and reformulates the Lit backdeployment features in terms of when a version of LLVM was introduced instead of encoding the system versions on which it hasn't been introduced yet. Although one can be derived from the other, encoding the negative form is extremely error-prone. Fixes #80901 | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 1 年前 |