[libcxx-commits] [PATCH] D77924: ld128 demangle: allow space for	'L' suffix.
    Elliott Hughes via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Fri Apr 10 17:47:51 PDT 2020
    
    
  
enh created this revision.
enh added reviewers: eugenis, srhines.
Herald added subscribers: libcxx-commits, danielkiss, kristof.beyls.
Herald added a project: libc++abi.
Herald added a reviewer: libc++abi.
Caught by HWASAN on arm64 Android (which uses ld128 for long double). This
was running the existing fuzzer.
The specific minimized fuzz input to reproduce this is:
  __cxa_demangle("1\006ILeeeEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE", 0, 0, 0);
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D77924
Files:
  libcxxabi/src/demangle/ItaniumDemangle.h
  llvm/include/llvm/Demangle/ItaniumDemangle.h
Index: llvm/include/llvm/Demangle/ItaniumDemangle.h
===================================================================
--- llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -5174,7 +5174,7 @@
 #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";
 };
 
Index: libcxxabi/src/demangle/ItaniumDemangle.h
===================================================================
--- libcxxabi/src/demangle/ItaniumDemangle.h
+++ libcxxabi/src/demangle/ItaniumDemangle.h
@@ -5174,7 +5174,7 @@
 #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";
 };
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77924.256719.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200411/4f1abceb/attachment.bin>
    
    
More information about the libcxx-commits
mailing list