summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-06-21 15:04:12 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-06-21 15:04:12 +0000
commit948a39aa7a9345702be95fd0c1681421b0f45af4 (patch)
tree9a4daaa5e2929bd54c4ded783bdafe762e664823
parent96409607c7c0803a9e573b496f506116bd6cafd4 (diff)
parent0765ef7bf2efebc246677624917669682e8cc1f3 (diff)
downloadlibcxxabi-android12-mainline-ipsec-release.tar.gz
Change-Id: I37e14776147b0e529e2efe62cb2bca03f6d02b37
-rw-r--r--Android.bp77
-rw-r--r--METADATA3
-rw-r--r--src/demangle/ItaniumDemangle.h2
-rw-r--r--test/test_demangle.pass.cpp7
4 files changed, 62 insertions, 27 deletions
diff --git a/Android.bp b/Android.bp
index 856b2d1..c6fcc0e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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]);