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

Eli Friedman via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 18 18:05:09 PDT 2020


efriedma added a comment.

In D77924#2225045 <https://reviews.llvm.org/D77924#2225045>, @enh wrote:

> also --- does the demangler even know the arch it's demangling for? i didn't see that in the bits of the code i'd looked at at least.

No, not at the moment.  It's something we could add if it was useful.  (I don't think we'd want to add it just for this.)

>>> (Regardless though, I think we should land this crash-fix.)
>>
>> Yes.  And maybe also change the code to use snprintf, so we never end up with a buffer overflow.
>
> as you saw, it does use snprintf, but the buffer size was too small.

It should be possible to use snprintf in a way that doesn't cause a buffer overflow even if the buffer is too small.


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