[Lldb-commits] [PATCH] D50473: [Demangle] Add another test for ItaniumPartialDemangler
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 8 15:35:51 PDT 2018
sgraenitz added inline comments.
Comment at: unittests/Demangle/PartialDemangleTest.cpp:188
+ size_t N = OriginalSize;
+ char *Res = D.getFunctionName(Buf, &N);
+ EXPECT_EQ(nullptr, Res);
> Does LLDB actually pass in a N that is less than the length of Buf? Its not wrong to do that per se, realloc will sort it out, but it seems kinda strange.
My first version used only one variable for N, so the pretended buffer size was decreasing continuously while the actual buffer remained unchanged.. That caused unnecessary allocations. I fixed that a few days ago. Basically it's these three cases to consider:
More information about the lldb-commits