diff options
author | Elliott Hughes <enh@google.com> | 2020-10-27 20:43:12 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-27 20:43:12 +0000 |
commit | 3827989879956d03496780b3f8119dc4139eb45b (patch) | |
tree | c692a6c44df756b5abbec213cea79f0c03e278de | |
parent | a7904cd01a7fd8234fe1085c058000e518405ace (diff) | |
parent | 7ad3c1475e6a68879062cd5d6be8f6982d8087f9 (diff) | |
download | libcxxabi-3827989879956d03496780b3f8119dc4139eb45b.tar.gz |
libcxxabi: ld128 demangle: allow space for 'L' suffix. am: 2d219d5cf1 am: 7aab6b7d6c am: 7ad3c1475e
Original change: https://android-review.googlesource.com/c/platform/external/libcxxabi/+/1475460
Change-Id: I30af11b9a2efd2121454717c540e0fe084680717
-rw-r--r-- | src/demangle/ItaniumDemangle.h | 2 | ||||
-rw-r--r-- | test/test_demangle.pass.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
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..02e8407 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+11983"}}, +#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]); |