summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for demangling C++11 thread_local variables. In clang, the ↵David Bozier2017-01-311-0/+2
| | | | | | grammar for mangling for these names are "<special-name> ::= TW <object name>" for wrapper variables or "<special-name> ::= TH <object name>" for initialization variables. llvm-svn: 293638
* Fix ASAN failure in cxa_demangleMehdi Amini2017-01-271-0/+1
| | | | | | Found with ASAN + libFuzzer by Kostya Serebryany <kcc@google.com> llvm-svn: 293330
* cxa_demangle: fix rvalue ref checkSaleem Abdulrasool2017-01-241-3/+2
| | | | | | | | | | | | When checking if the type is a r-value ref, we would not do a complete check. This would result in us treating a trailing parameter reference `&)` as a r-value ref, and improperly inject the cv qualifier on the type. We now correctly demangle the type `KFvRmE` as a constant function rather than a constant reference. Fixes PR31741! llvm-svn: 292973
* cxa_demangle: avoid butchering the last parameter typeSaleem Abdulrasool2017-01-241-0/+6
| | | | | | | | | | | Fix an off-by-one case which would destroy the final parameter in a CV-qualified function type with a reference. We still get the CV qualification incorrect, but at least we do not clobber the type name any longer. Partially fixes PR31741. llvm-svn: 292963
* Remove all usages of REQUIRES-ANY in the test suite.Eric Fiselier2017-01-244-4/+4
| | | | | | | | | Pending LIT changes are about to remove the REQUIRES-ANY keyword in place of supporting boolean && and || within "REQUIRES". This patch prepares libc++ for that change so that when applied the bots don't lose their mind. llvm-svn: 292906
* Fix catch_reference_nullptr.pass.cpp test for GCC.Eric Fiselier2017-01-201-7/+1
| | | | | | | | | | | | This test contained an implicit conversion from nullptr to bool. Clang warns about this but the test had supressed that warning. However GCC diagnoses the same code as an error and requires -fpermissive to accept it. This patch fixes both the warning and the error by explicitly converting the pointer to bool. llvm-svn: 292638
* Revert r286788Jonathan Roelofs2017-01-181-0/+3
| | | | | | | | | | | | | | | | The Itanium ABI [1] specifies that __cxa_demangle accept either: 1) symbol names, which start with "_Z" 2) type manglings, which do not start with "_Z" r286788 erroneously assumes that it should only handle symbols, so this patch reverts it and adds a counterexample to the testcase. 1: https://mentorembedded.github.io/cxx-abi/abi.html#demangler Reviewers: zygoloid, EricWF llvm-svn: 292418
* Mark the dynamic-exception tests as unsupported under C++17, since it has no ↵Marshall Clow2017-01-165-4/+4
| | | | | | dynamic-exception specs. Also, remove a FIXME workaround from the config that allowed these tests to work under C++17. This addresses PR#31621. llvm-svn: 292135
* [libcxxabi] Cleanup and adapt for r291275. NFC.Asiri Rathnayake2017-01-092-3/+3
| | | | | | | | | | | + Now that libcxxabi shares the same threading API as libcxx, a whole chunk of code in src/config.h is made redundant (I missed this earlier). + r291275 split off the externalized-thread-api libcxx configuration from the external-thread-library libcxx configuration. libcxxabi should follow the same approach. llvm-svn: 291440
* [libcxxabi] Introduce an externally threaded libc++abi variant.Asiri Rathnayake2017-01-035-5/+14
| | | | | | | | | | r281179 Introduced an externally threaded variant of the libc++ library. This patch adds support for a similar library variant for libc++abi. Differential revision: https://reviews.llvm.org/D27575 Reviewers: EricWF llvm-svn: 290888
* Suppress unreachable code warning in unwind testsEric Fiselier2016-12-245-0/+20
| | | | llvm-svn: 290487
* Fix warnings in libc++abi testsEric Fiselier2016-12-2411-39/+42
| | | | llvm-svn: 290471
* [libc++abi] Mark failing test on Darwin as XFAILShoaib Meenai2016-12-131-0/+4
| | | | | | | | | | | | | The macOS thread-local variable finalizer routines do not handle the case where a termination function registers another termination function correctly, causing this test to fail. I've filed a radar for this; mark the test XFAIL in the meantime. See [1] for more details. [1] http://lists.llvm.org/pipermail/cfe-dev/2016-November/051376.html Differential Revision: https://reviews.llvm.org/D27434 llvm-svn: 289513
* Fix signed comparison warningEric Fiselier2016-12-111-2/+2
| | | | llvm-svn: 289365
* Workaround the removal of dynamic exception specifications in C++17Eric Fiselier2016-12-111-1/+5
| | | | llvm-svn: 289353
* Check for SD-6 feature test macro when determining which tests should beRichard Smith2016-12-023-12/+7
| | | | | | available, rather than #ifdef'ing away the relevant tests if it's unavailable. llvm-svn: 288543
* Fix up r288457 for compilers that don't support noexcept function types:Richard Smith2016-12-022-4/+8
| | | | | | | disable the test entirely for those cases. This is a quick patch, I'll look at a proper feature flag next. llvm-svn: 288539
* Update implementation of ABI support for throwing noexcept function pointersRichard Smith2016-12-023-4/+6
| | | | | | | and catching as non-noexcept to match the final design per discusson on cxx-abi-dev. llvm-svn: 288457
* __cxa_demangle: allow demangling invocation blocksSaleem Abdulrasool2016-11-141-2/+4
| | | | | | | | | | | | The block invocation function uses an extension where the prefix is ___Z as opposed to _Z. This should make the tests pass again. Disable a negative test which was testing a crasher. The symbol being demangled is not a valid mangled symbol and will return a nullptr. Adjust the type info decoding test to be a valid symbol name. llvm-svn: 286793
* Fix GCC libc++abi buildEric Fiselier2016-11-131-0/+1
| | | | llvm-svn: 286783
* arm: Fix ttype encoding assertion failure.Logan Chien2016-11-135-1/+202
| | | | | | | | GCC 4.7 or newer emits 0x90 (indirect | pcrel) as the ttype encoding. This would hit an assertion in cxa_personality.cpp. This commit fixes the problem by relaxing the assertion. llvm-svn: 286760
* [libc++abi] Remove the test for checking using of fallback malloc in case of ↵Igor Kudrin2016-11-091-40/+0
| | | | | | | | dynamic memory exhaustion. This test is too fragile and doesn't add significant value. See https://reviews.llvm.org/D26150 for some details. llvm-svn: 286337
* [p0012] Implement ABI support for throwing a noexcept function pointer andRichard Smith2016-11-023-0/+135
| | | | | | | | | | | | | | | | catching as non-noexcept This implements the following proposal from cxx-abi-dev: http://sourcerytools.com/pipermail/cxx-abi-dev/2016-October/002988.html ... which is necessary for complete support of http://wg21.link/p0012, specifically throwing noexcept function and member function pointers and catching them as non-noexcept pointers. Differential Review: https://reviews.llvm.org/D26178 llvm-svn: 285867
* Spell libcxxabi-no-threads correctlyEric Fiselier2016-10-311-1/+1
| | | | llvm-svn: 285571
* Mark thread exit test as unsupported w/o threadsEric Fiselier2016-10-301-0/+1
| | | | llvm-svn: 285523
* Mark test as unsupported without threadsEric Fiselier2016-10-142-0/+2
| | | | llvm-svn: 284217
* [libcxxabi] Refactor pthread usage into a separate APIAsiri Rathnayake2016-10-132-8/+6
| | | | | | | | | | | | | | | | | | This patch refactors all pthread uses of libc++abi into a separate API. This is the first step towards supporting an externlly-threaded libc++abi library. I've followed the conventions already used in the libc++ library for the same purpose. Patch from: Saleem Abdulrasool and Asiri Rathnayake Reviewed by: compnerd, EricWF Differential revisions: https://reviews.llvm.org/D18482 (original) https://reviews.llvm.org/D24864 (final) llvm-svn: 284128
* Provide a fallback __cxa_thread_atexit() implementation. Patch from Tavian ↵Eric Fiselier2016-10-125-5/+56
| | | | | | Barnes llvm-svn: 283988
* Fix libc++abi test config after recent libc++ changesEric Fiselier2016-10-121-0/+4
| | | | llvm-svn: 283962
* Recommit r282692: [libc++abi] Use fallback_malloc to allocate ↵Igor Kudrin2016-10-072-1/+41
| | | | | | | | | | | | | | | | | __cxa_eh_globals in case of dynamic memory exhaustion. Throwing an exception for the first time may lead to call calloc to allocate memory for __cxa_eh_globals. If the memory pool is exhausted at that moment, it results in abnormal termination of the program. This patch addresses the issue by using fallback_malloc in that case. In this revision, some restrictions were added into the test to not run it in unsuitable environments. Differential Revision: https://reviews.llvm.org/D17815 llvm-svn: 283531
* Revert r282692: Use fallback_malloc to allocate __cxa_eh_globals in case of ↵Igor Kudrin2016-09-292-33/+1
| | | | | | | | dynamic memory exhaustion. The test breaks build bots. llvm-svn: 282703
* [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of ↵Igor Kudrin2016-09-292-1/+33
| | | | | | | | | | | | | | dynamic memory exhaustion. Throwing an exception for the first time may lead to call calloc to allocate memory for __cxa_eh_globals. If the memory pool is exhausted at that moment, it results in abnormal termination of the program. This patch addresses the issue by using fallback_malloc in that case. Differential Revision: https://reviews.llvm.org/D17815 llvm-svn: 282692
* [libcxxabi] cleanup the use of LIBCXXABI_HAS_NO_THREADS macro (NFC)Asiri Rathnayake2016-09-213-26/+16
| | | | | | | Align the naming / use of the macro LIBCXXABI_HAS_NO_THREADS to follow what we have in libcxx. NFC. llvm-svn: 282062
* Fix side effect in assertionEric Fiselier2016-09-161-1/+1
| | | | llvm-svn: 281709
* [lit] Replace print with lit_config.note().Logan Chien2016-09-021-1/+1
| | | | | | | This commit replaces print statement with lit_config.note(). This fixes python3 support for check-libcxxabi. llvm-svn: 280484
* [CMake] Be more consistent about naming targets and components in libc++abiEric Fiselier2016-08-281-1/+4
| | | | | | | | | | | | | | | | | | This patch (and commit summary) mirror r279675 by Chris B which was applied to libc++ but not libc++abi. Summary: The point of this patch is to have a consistent convention for naming build, check and install targets so that the targets can be constructed from the project name. This change renames a bunch of CMake components and targets from libcxxabi to cxxabi. For each renamed target I've added a convenience target that matches the old target name and depends on the new target. This will preserve function of the old targets so that the change doesn't break the world. We can evaluate if it is worth removing the extra targets later. llvm-svn: 279938
* [CMake] Apply r279151 cleanup to libc++abi.Eric Fiselier2016-08-281-1/+2
| | | | | | | | | | | | This patch applies changes similar to those in r279515 to libc++abi. Summary of changes in this patch: * Renamed variable LLVM_CONFIG -> LLVM_CONFIG_PATH * Renamed variable LIBCXXABI_BUILT_STANDALONE -> LIBCXXABI_STANDALONE_BUILD * Add an include of AddLLVM in the tests subdirectory for add_lit_testsuite. llvm-svn: 279936
* test: fix test under ASAN and MSANSaleem Abdulrasool2016-08-281-0/+4
| | | | | | | | | | | | When we're running tests under ASAN or MSAN, they're compiled with -O1, which enables tail call elimination. This causes backtrace_test to fail: the compiler performs tail call elimination for call3_nothrow, but it can't for call3_throw, leading to a mismatched frame count. Disable tail call elimination (and inlining, just to be explicit) to avoid this. Patch by Shoaib Meenai! llvm-svn: 279935
* Fix ASAN failures in the demanglerMehdi Amini2016-08-131-0/+16
| | | | | | These were found fuzzing with ASAN. llvm-svn: 278579
* Do not depend on unwind when building standalonePetr Hosek2016-08-081-4/+3
| | | | | | | | | | When libcxxabi is being built standalone, unwind dependency is not available, so do not use it even when LLVM unwinder is being requested. Differential Revision: https://reviews.llvm.org/D23228 llvm-svn: 278058
* Attempt to bring peace to -Werror buildbots.Richard Smith2016-07-191-0/+6
| | | | llvm-svn: 276022
* [libcxxabi] When catching an exception of type nullptr_t with a handler ofRichard Smith2016-07-195-22/+101
| | | | | | | | | | | | | pointer-to-member type, produce a null value of the right type. This fixes a bug where throwing an exception of type nullptr_t and catching it as a pointer-to-member would not guarantee to produce a null value in the catch handler. The fix is pretty simple: we statically allocate a constant null pointer-to-data-member representation and a constant null pointer-to-member-function representation, and produce the address of the relevant value as the adjusted pointer for the exception. llvm-svn: 276016
* Fix [libcxxabi] Fix warning about uninitialized const member.Eric Fiselier2016-06-151-1/+2
| | | | llvm-svn: 272824
* Fix warning about uninitialized const member. NFCEric Fiselier2016-06-151-0/+1
| | | | llvm-svn: 272823
* [libcxxabi] Reorder base class initializers in libc++abi tests to prevent ↵Eric Fiselier2016-06-152-4/+4
| | | | | | | | | | | | | | | | | | | -Wreorder Summary: This patch fixes -Wreorder warnings on test classes with virtual bases. Since the compiler is performing the reordering anyway this change *should* have NFC. However the test notes that it is checking that "virtual base classes work properly". Since initialization order is clearly part of correctness I want to confirm that this wasn't an intentional mistake. Reviewers: mclow.lists, howard.hinnant Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21396 llvm-svn: 272821
* Suppress warnings about the operations currently under test.Eric Fiselier2016-06-158-0/+54
| | | | llvm-svn: 272819
* [libcxxabi] Allow target flags to affect configuration tests.Eric Fiselier2016-06-022-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This patch changes the libc++abi CMake so that it adds certain target flags like '-m32' or '--gcc-toolchain' before including `config-ix.cmake`. Since these flags can affect things like `check_library_exists([...])` they needed to be added before the tests are performed. Additionally this patch adds `LIBCXXABI_BUILD_32_BITS` which defaults to `LLVM_BUILD_32_BITS`. This patch fixes: https://llvm.org/bugs/show_bug.cgi?id=27950 https://llvm.org/bugs/show_bug.cgi?id=27959 Reviewers: danalbert, jroelofs, bcraig, compnerd, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20886 llvm-svn: 271470
* [libcxxabi][test] Add missing return statement.Asiri Rathnayake2016-06-011-1/+1
| | | | | | | | This causes a test failure when running with -Werror=return-type. NFC. llvm-svn: 271423
* [libcxxabi] Introduce a -fno-exceptions libc++abi libary variantAsiri Rathnayake2016-05-3143-6/+342
| | | | | | | | | | | | | | | | | Currently there is only support for a -fno-exceptions libc++ build. This is problematic for functions such as std::terminate() which are defined in libc++abi and using any of those functions throws away most of the benefits of using -fno-exceptions (code-size). This patch introduces a -fno-exceptions libc++abi build to address this issue. This new variant of libc++abi cannot be linked against any with-exceptions code as some symbols necessary for handling exceptions are missing in this library. Differential revision: http://reviews.llvm.org/D20677 Reviewers: EricWF, mclow.lists, bcraig llvm-svn: 271267
* Enable testing for static libc++abiBen Craig2016-04-193-11/+13
| | | | | | | | | | | | | This change leverages framework changes made in libcxx. See those changes for more details. (http://reviews.llvm.org/D16544) Some Mac specific logic for testing against libc++abi had to be moved from libcxxabi's config.py, as it was overriding choices made in libcxx's config.py. That logic is now in libcxx's target_info.py. http://reviews.llvm.org/D16545 llvm-svn: 266729
OpenPOWER on IntegriCloud