Skip to content
Unverified Commit ff2e6199 authored by Ashay Rane's avatar Ashay Rane
Browse files

[clang] remove dereferencing of invalid pointer

A line in the demangling code for float literals dereferences the
`.end()` iterator, which causes the Windows debug build of llvm-cxxfilt
to crash.  The failure can be reproduced by passing the string
`_Z5dummyIXtl8wrapper1IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_ELd405ec00000000000EEEEEEvv`
to `llvm-cxxfilt -n`.

This patch rewrites the code to use the `.size()` member of the
string_view type to avoid dereferencing past the buffer.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D149061
parent be932566
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment