[Lldb-commits] [lldb] r362510 - [lldb] Fix out-of-bounds read after c3ea7c66fec021867e005ad1b02f3c7e80feaa85
James Y Knight via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 4 08:27:19 PDT 2019
Author: jyknight
Date: Tue Jun 4 08:27:19 2019
New Revision: 362510
URL: http://llvm.org/viewvc/llvm-project?rev=362510&view=rev
Log:
[lldb] Fix out-of-bounds read after c3ea7c66fec021867e005ad1b02f3c7e80feaa85
"Add support for mid-function epilogues on x86 that end in a non-local jump."
Detected by asan.
Modified:
lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp?rev=362510&r1=362509&r2=362510&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp Tue Jun 4 08:27:19 2019
@@ -736,7 +736,6 @@ bool x86AssemblyInspectionEngine::pc_rel
int opcode_size = 0;
uint8_t b1 = m_cur_insn[0];
- uint8_t b2 = m_cur_insn[1];
switch (b1) {
case 0x77: // JA/JNBE rel8
@@ -764,6 +763,7 @@ bool x86AssemblyInspectionEngine::pc_rel
break;
}
if (b1 == 0x0f && opcode_size == 0) {
+ uint8_t b2 = m_cur_insn[1];
switch (b2) {
case 0x87: // JA/JNBE rel16/rel32
case 0x86: // JBE/JNA rel16/rel32
More information about the lldb-commits
mailing list