diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-08 19:17:42 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-08 19:17:42 +0000 |
| commit | b328dcbf850ed6b7a4fab603f58dc6a51e14f984 (patch) | |
| tree | b93b835f0014a8a9856b2c465df18dd36b4a2c27 /lldb/source/API | |
| parent | 8cb804a3c9ce2ba4e6d4a04d9ff48329a701f2cb (diff) | |
| download | bcm5719-llvm-b328dcbf850ed6b7a4fab603f58dc6a51e14f984.tar.gz bcm5719-llvm-b328dcbf850ed6b7a4fab603f58dc6a51e14f984.zip | |
[Reproducer] Don't isntrument methods that get called from the signal handler.
LLDB's signal handlers call SBDebugger methods, which themselves try to
be really careful about not doing anything non-signal safe. The
Reproducer record macro is not careful though, and does unsafe things
which potentially caused LLDB to crash. Given that these methods are not
particularly interesting I've swapped the RECORD macros with DUMMY ones,
so that we still register the API boundary but don't do anything
non-signal safe.
Thanks Jim for figuring this one out!
llvm-svn: 374104
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBDebugger.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index b9ee5047545..85c8e0a8903 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -430,14 +430,14 @@ SBFile SBDebugger::GetErrorFile() { } void SBDebugger::SaveInputTerminalState() { - LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, SaveInputTerminalState); + LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, SaveInputTerminalState); if (m_opaque_sp) m_opaque_sp->SaveInputTerminalState(); } void SBDebugger::RestoreInputTerminalState() { - LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, RestoreInputTerminalState); + LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, RestoreInputTerminalState); if (m_opaque_sp) m_opaque_sp->RestoreInputTerminalState(); @@ -1093,7 +1093,7 @@ void SBDebugger::DispatchInput(const void *data, size_t data_len) { } void SBDebugger::DispatchInputInterrupt() { - LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, DispatchInputInterrupt); + LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, DispatchInputInterrupt); if (m_opaque_sp) m_opaque_sp->DispatchInputInterrupt(); @@ -1253,8 +1253,7 @@ uint32_t SBDebugger::GetTerminalWidth() const { } void SBDebugger::SetTerminalWidth(uint32_t term_width) { - LLDB_RECORD_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t), - term_width); + LLDB_RECORD_DUMMY(void, SBDebugger, SetTerminalWidth, (uint32_t), term_width); if (m_opaque_sp) m_opaque_sp->SetTerminalWidth(term_width); |

