Chromium Code Reviews| Index: base/debug/stack_trace_posix.cc |
| diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc |
| index 9593962d3aa838019b839c3df8a36ff9facd2a83..2067f6c12573cbc9d7405914a1af63c35779a9fb 100644 |
| --- a/base/debug/stack_trace_posix.cc |
| +++ b/base/debug/stack_trace_posix.cc |
| @@ -281,6 +281,16 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) { |
| } |
| PrintToStderr("\n"); |
| +#if defined(CFI_ENFORCEMENT) |
| + if (signal == SIGILL && info->si_code == ILL_ILLOPN) { |
| + PrintToStderr( |
| + "CFI: Most likely a control flow integrity violation; for more " |
| + "information see:\n"); |
| + PrintToStderr( |
| + "https://www.chromium.org/developers/testing/control-flow-integrity\n"); |
| + } |
| +#endif |
| + |
| debug::StackTrace().Print(); |
| #if defined(OS_LINUX) |
| @@ -395,6 +405,13 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) { |
| write(STDERR_FILENO, buf, std::min(len, sizeof(buf) - 1)); |
| #endif // ARCH_CPU_32_BITS |
| #endif // defined(OS_MACOSX) |
| + |
| +#if defined(CFI_ENFORCEMENT) |
| + if (signal == SIGILL && info->si_code == ILL_ILLOPN) { |
| + PrintToStderr("CFI: Aborting\n"); |
| + } |
| +#endif |
|
Nico
2015/08/05 20:59:07
this block seems to not add anything useful
pcc1
2015/08/05 21:00:30
It acts as an end marker for the problem report. C
|
| + |
| _exit(1); |
| } |