This patch adds support for handling the SIGSEGV signal with 'si_code ==
SEGV_BNDERR', which is thrown when a bound violation is caught by the
Intel(R) MPX technology.
Signed-off-by: Valentina Giusti <valentina.giusti@intel.com>
Paths
| Differential D25329
Add bound violation handling for Intel(R) Memory Protection Extensions (Intel(R) MPX) ClosedPublic Authored by valentinagiusti on Oct 6 2016, 8:30 AM.
Details
Summary This patch adds support for handling the SIGSEGV signal with 'si_code == Signed-off-by: Valentina Giusti <valentina.giusti@intel.com>
Diff Detail
Event Timelinevalentinagiusti retitled this revision from to Add bound violation handling for Intel(R) Memory Protection Extensions (Intel(R) MPX). valentinagiusti updated this object. labath edited edge metadata. Comment Actionslgtm. At one point I'd like to change this code to not transfer the "crash reason" as string, but in a more structured way (i.e., qXfer:siginfo:read packet), but that is certainly out of scope of this patch. This revision is now accepted and ready to land.Oct 6 2016, 8:51 AM valentinagiusti edited edge metadata. Comment Actionsused llvm:raw_string_ostream instead of std::stringstream
Closed by commit rL283474: Add bound violation handling for Intel(R) Memory Protection Extensions (Intel… (authored by valentinagiusti). · Explain WhyOct 6 2016, 11:14 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 73811 packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/Makefile
packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py
packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp
source/Plugins/Process/Linux/NativeThreadLinux.cpp
source/Plugins/Process/POSIX/CrashReason.h
source/Plugins/Process/POSIX/CrashReason.cpp
|
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?