[Lldb-commits] [PATCH] D25329: Add bound violation handling for Intel(R) Memory Protection Extensions (Intel(R) MPX)

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 6 09:47:57 PDT 2016


zturner added inline comments.


> CrashReason.cpp:38
> +  stream << ")";
> +  str += stream.str();
> +}

Actually I'm not sure this is correct.  Since you initialize the stream with `str`, as soon as you call `stream.str()` it will flush everything to the underlying string.  Now `str` will contain the full formatted data.  Then you will call `str += str` and have a second copy of it.

I think you should just write `stream.flush();`

Can you check whether this works?

https://reviews.llvm.org/D25329





More information about the lldb-commits mailing list