diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-21 16:58:35 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-21 16:58:35 +0000 |
commit | 373aca8157b8e442b847e3c9c2fe2d9dd680a5b9 (patch) | |
tree | 9a4daaa5e2929bd54c4ded783bdafe762e664823 | |
parent | 96409607c7c0803a9e573b496f506116bd6cafd4 (diff) | |
parent | 0765ef7bf2efebc246677624917669682e8cc1f3 (diff) | |
download | libcxxabi-android12-mainline-sdkext-release.tar.gz |
Snap for 7570015 from 0765ef7bf2efebc246677624917669682e8cc1f3 to mainline-sdkext-releaseandroid-mainline-12.0.0_r81android-mainline-12.0.0_r37android-mainline-12.0.0_r17android-mainline-12.0.0_r109aml_sdk_311710000android12-mainline-sdkext-release
Change-Id: I2bf3515250f9580134cfad38d88b920669809e93
-rw-r--r-- | Android.bp | 77 | ||||
-rw-r--r-- | METADATA | 3 | ||||
-rw-r--r-- | src/demangle/ItaniumDemangle.h | 2 | ||||
-rw-r--r-- | test/test_demangle.pass.cpp | 7 |
4 files changed, 62 insertions, 27 deletions
@@ -14,10 +14,49 @@ // limitations under the License. // +package { + default_applicable_licenses: ["external_libcxxabi_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// +// large-scale-change included anything that looked like it might be a license +// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. +// +// Please consider removing redundant or irrelevant files from 'license_text:'. +// See: http://go/android-license-faq +license { + name: "external_libcxxabi_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-BSD", + "SPDX-license-identifier-MIT", + "SPDX-license-identifier-NCSA", + ], + license_text: [ + "LICENSE.TXT", + "NOTICE", + ], +} + cc_defaults { name: "libc++abi_defaults", vendor_available: true, + product_available: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, native_bridge_supported: true, include_dirs: ["external/libcxx/include"], @@ -79,27 +118,7 @@ cc_library_static { "src/stdlib_stdexcept.cpp", "src/stdlib_typeinfo.cpp", ], - arch: { - arm: { - include_dirs: ["external/libunwind_llvm/include"], - cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"], - }, - arm64: { - cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"], - }, - mips: { - cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"], - }, - mips64: { - cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"], - }, - x86: { - cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"], - }, - x86_64: { - cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"], - }, - }, + cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"], target: { android: { cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"], @@ -138,11 +157,6 @@ cc_library_static { "src/stdlib_new_delete.cpp", ], }, - windows_x86: { - cppflags: [ - "-fsjlj-exceptions", - ], - }, }, apex_available: [ "//apex_available:platform", @@ -150,3 +164,14 @@ cc_library_static { ], min_sdk_version: "apex_inherit", } + +cc_fuzz { + name: "cxa_demangle_fuzzer", + host_supported: true, + local_include_dirs: ["include"], + + srcs: [ + "fuzz/cxa_demangle_fuzzer.cpp", + "src/cxa_demangle.cpp", + ], +} diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..d97975c --- /dev/null +++ b/METADATA @@ -0,0 +1,3 @@ +third_party { + license_type: NOTICE +} diff --git a/src/demangle/ItaniumDemangle.h b/src/demangle/ItaniumDemangle.h index 9e9d183..7dc6e8e 100644 --- a/src/demangle/ItaniumDemangle.h +++ b/src/demangle/ItaniumDemangle.h @@ -4896,7 +4896,7 @@ struct FloatData<long double> #else static const size_t mangled_size = 20; // May need to be adjusted to 16 or 24 on other platforms #endif - static const size_t max_demangled_size = 40; + static const size_t max_demangled_size = 41; static constexpr const char *spec = "%LaL"; }; diff --git a/test/test_demangle.pass.cpp b/test/test_demangle.pass.cpp index 7c1fd2d..943f27c 100644 --- a/test/test_demangle.pass.cpp +++ b/test/test_demangle.pass.cpp @@ -16,6 +16,8 @@ // Is long double fp80? (Only x87 extended double has 64-bit mantissa) #define LDBL_FP80 (__LDBL_MANT_DIG__ == 64) +// Is long double fp128? +#define LDBL_FP128 (__LDBL_MANT_DIG__ == 113) const char* cases[][2] = { @@ -29785,6 +29787,11 @@ struct FPLiteralCase { "void test0::h<float>(char (&) [(unsigned int)((sizeof (float)) + (0xap-1L))])", }}, #endif +#if LDBL_FP128 + // This was found by libFuzzer+HWASan on aarch64 Android. + {"1\006ILeeeEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE", + {"\x6<-0x1.cecececececececececececececep+11983L>"}}, +#endif }; const unsigned NF = sizeof(fp_literal_cases) / sizeof(fp_literal_cases[0]); const unsigned NEF = sizeof(fp_literal_cases[0].expecting) / sizeof(fp_literal_cases[0].expecting[0]); |