[Lldb-commits] [lldb] r184877 - Fix undefined behaviour in data formatter test -- ensure char* null-terminated
daniel.malea at intel.com
Tue Jun 25 14:39:48 PDT 2013
Sorry if the commit message sounds like it was fixing some C++ code with
undefined behaviour -- it is not.
The problem was in the way the test makes LLDB print a non-null terminated
char*, thereby reading random memory. I don't think we should change the
way LLDB handles char* -- after all in 99.9% of cases they are
null-terminated strings, so it would be silly to print something else
(like the pointer) instead.
I don't think any of this exposes a data formatter problem though.
On 2013-06-25 5:15 PM, "Tim Northover" <tnorthover at apple.com> wrote:
>> Fix undefined behaviour in data formatter test -- ensure char*
>> null-terminated so LLDB does not read off the end of the array.
>Isn't that a real problem in the formatter? I suppose it's very difficult
>decide what to do since "char *" usually is a string. But still, the
>C++ wasn't undefined (at least in that aspect).
More information about the lldb-commits