summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-12-12[libcxxabi] Pass LIBCXXABI_SYSROOT and LIBCXXABI_GCC_TOOLCHAIN to litPetr Hosek
These are expected to be set by the shared lit scripts used from libc++. Differential Revision: https://reviews.llvm.org/D40818 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@320445 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22[demangler] Support for abi_tag attributeErik Pilkington
Differential revision: https://reviews.llvm.org/D40279 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@318874 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21[demangler] Document some features that the demangler doesn't yet support, NFCErik Pilkington
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@318765 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-09Mark test as unsupported c++98/03 to fix buildbotsErik Pilkington
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@310530 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-09[demangler] Improve representation of substitutions/templatesErik Pilkington
Differential revision: https://reviews.llvm.org/D36427 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@310525 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-06[demangler] Fix another oss-fuzz bugErik Pilkington
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@310226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01[demangler] Fix another bug found by oss-fuzz in r309340Erik Pilkington
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@309650 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-30[demangler] Fix some bugs in r309340 found by oss-fuzzErik Pilkington
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@309520 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28[demangler] Use an AST to represent demangled namesErik Pilkington
The demangler now demangles by producing an AST, then traverses that AST to produce a demangled name. This is done for performance reasons, now the demangler doesn't manuiplate std::strings, which hurt performance and caused string operations to be inlined into the parser, leading to large code size and stack usage. Differential revision: https://reviews.llvm.org/D35159 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@309340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13[demangler] Respect try_to_parse_template_argsErik Pilkington
Fixes an exponential parse found by oss-fuzz. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@307941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06Fix incomplete type test on OS X; workaround weird DYLD_LIBRARY_PATH behaviorEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@307230 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-22Add some catch(...) blocks to the tests so that if they fail, we get a good ↵Marshall Clow
error message. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305977 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-28[demangler] Fix a exponential string copying bugErik Pilkington
The problem was that if base_name() was called from a context without an actual base name, it could gulp up the entire string, which can result in recursive duplications. The fix is to be more strict as to what qualifies as a base name. Differential revision: https://reviews.llvm.org/D33637 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@304113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24__cxa_demangle: Fix constructor cv qualifier handlingTamas Berghammer
Summary: Previously if we parsed a constructor then we set parsed_ctor_dtor_cv to true and never reseted it. This causes issue when a template argument references a constructor (e.g. type of lambda defined inside a constructor) as we will have the parsed_ctor_dtor_cv flag set what will cause issues when parsing later arguments. Reviewers: EricWF, compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33385 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303737 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24[demangler] Fix a crash in the demangler during parsing of a lamdbaErik Pilkington
The problem is that multiple types could have been parsed from parse_type(), which the lamdba parameter parsing didn't handle. Differential revision: https://reviews.llvm.org/D33368 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303718 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-16[libcxxabi] Fix the test case committed in r303175.Akira Hatanaka
Free the __cxa_exception object allocated with __cxa_allocate_exception. This is an attempt to fix this asan bot: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-asan/builds/560 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303194 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-16[libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka
r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. This recommits r302978 and r302981, which were reverted in r303016 because a libcxx test was failing on an AArch64 bot. I also modified the libcxxabi test case to check the alignment of the pointer returned by __cxa_allocate_exception rather than compiling the test with -O1 and checking whether it segfaults. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-14Revert r302978 and r302981.Akira Hatanaka
Revert the two commits to understand why the following aarch64 bot is failing. http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-aarch64-linux git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13[libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka
r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. This recommits r302763 with fixes to RUN lines in the test case. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302978 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11Revert "[libcxxabi] Align unwindHeader on a double-word boundary."Akira Hatanaka
This reverts commit r302763. The commit caused bot failures. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11[libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka
r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10Fix use of now removed %exec test substitutionEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302698 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10Fix use of removed SH test replacement %execEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302629 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09XFAIL noexcept member function throw/catch test under GCC.Eric Fiselier
I'm still not exactly sure why the test fails, but I suspect it's a bug in GCC. More investigation needed. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302489 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20Fix PR25874 - cxa_thread_atexit_test.pass.cpp has an incorrect XFAIL.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@300925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04Fix exception address alignment test for EHABIAsiri Rathnayake
This test fails on ARM bare-metal targets because it assumes the Itanium ABI, whereas EHABI requires the exception address to be 8-byte aligned. I was a bit puzzled at first because this should've failed on the public arm-linux builder too. I think the reason it passes there is because we don't include libunwind headers in the include path when running the libcxxabi tests, so the system unwind.h gets picked up. Reviewers: rengolin, EricWF Differential revision: https://reviews.llvm.org/D31178 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299435 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30[libc++abi] Delete config.hShoaib Meenai
Summary: It's now completely empty, so we can remove it entirely. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31502 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299129 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04Add missing UNSUPPORTED for -fno-exception modeEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296957 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04Attempt to suppress test failures on OS XEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296955 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04[libcxxabi] Fix alignment of allocated exceptions in 32 bit buildsEric Fiselier
Summary: In 32 bit builds on a 64 bit system `std::malloc` does not return correctly aligned memory. This leads to undefined behavior. This patch switches to using `posix_memalign` to allocate correctly aligned memory instead. Reviewers: mclow.lists, danalbert, jroelofs, compnerd Reviewed By: compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25417 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296952 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04Fix PR25874 - Detect features required for cxa_thread_atexit_test.pass.cppEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296940 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-27Attempt to fix arm-native libcxxabi tests for the no-exceptions variantAsiri Rathnayake
These tests embed calls to exceptions-related symbols from the abi library, which are absent in the no-exceptions variant. The tests need to be marked as unsupported for the no-exceptions configuration. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296344 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17Fix test_exception_storage.pass.cpp in C++17 my re-enabling the unexpected ↵Eric Fiselier
handlers git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@295411 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09Fix path to libc++'s python test moduleEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@294671 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-31Add support for demangling C++11 thread_local variables. In clang, the ↵David Bozier
grammar for mangling for these names are "<special-name> ::= TW <object name>" for wrapper variables or "<special-name> ::= TH <object name>" for initialization variables. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@293638 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-27Fix ASAN failure in cxa_demangleMehdi Amini
Found with ASAN + libFuzzer by Kostya Serebryany <kcc@google.com> git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@293330 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24cxa_demangle: fix rvalue ref checkSaleem Abdulrasool
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! git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292973 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24cxa_demangle: avoid butchering the last parameter typeSaleem Abdulrasool
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292963 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24Remove all usages of REQUIRES-ANY in the test suite.Eric Fiselier
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292906 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20Fix catch_reference_nullptr.pass.cpp test for GCC.Eric Fiselier
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292638 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18Revert r286788Jonathan Roelofs
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292418 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16Mark the dynamic-exception tests as unsupported under C++17, since it has no ↵Marshall Clow
dynamic-exception specs. Also, remove a FIXME workaround from the config that allowed these tests to work under C++17. This addresses PR#31621. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292135 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09[libcxxabi] Cleanup and adapt for r291275. NFC.Asiri Rathnayake
+ 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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291440 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03[libcxxabi] Introduce an externally threaded libc++abi variant.Asiri Rathnayake
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-24Suppress unreachable code warning in unwind testsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-24Fix warnings in libc++abi testsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13[libc++abi] Mark failing test on Darwin as XFAILShoaib Meenai
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@289513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-11Fix signed comparison warningEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@289365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-11Workaround the removal of dynamic exception specifications in C++17Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@289353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02Check for SD-6 feature test macro when determining which tests should beRichard Smith
available, rather than #ifdef'ing away the relevant tests if it's unavailable. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@288543 91177308-0d34-0410-b5e6-96231b3b80d8