[Lldb-commits] [lldb] r106416 - /lldb/trunk/source/Core/Error.cpp
benny.kra at googlemail.com
Mon Jun 21 09:54:10 PDT 2010
On 21.06.2010, at 18:15, Chris Lattner wrote:
>> Don't snprintf directly into a std::string, it's undefined behavior per C++03.
>> This also fixes a bug where we were trying to copy m_string into itself
>> via a format string. The pointer was invalidated by m_string.resize and
>> lldb (sometimes) crashed inside vsnprintf.
> I haven't looked at the surrounding code, but would it be better to change this method to take a Twine?
That would be nice but this method is used all over the place in lldb and I don't feel like doing big
refactorings without a test suite …
More information about the lldb-commits