[libcxx-commits] [PATCH] D77924: ld128 demangle: allow space for 'L' suffix.

Erik Pilkington via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 11 11:43:37 PDT 2020


erik.pilkington added a comment.

Can you add your test to libcxxabi/test/test_demangle.pass.cpp? You can put it in invalid_cases if you expect it to fail to demangle.



================
Comment at: libcxxabi/src/demangle/ItaniumDemangle.h:5177
 #endif
-    static const size_t max_demangled_size = 40;
+    static const size_t max_demangled_size = 41;
     static constexpr const char *spec = "%LaL";
----------------
Do you know to get the actual upper bound of this? Is it actually 41? Its only used one place for a stack buffer so it doesn't really matter if its too large. It'd also be nice if we were more defensive in the call to snprintf, we should've been able to handle this more gracefully. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77924/new/

https://reviews.llvm.org/D77924





More information about the libcxx-commits mailing list