summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-06-04 15:27:19 +0000
committerJames Y Knight <jyknight@google.com>2019-06-04 15:27:19 +0000
commitdbb4322e511b6be756c8fd0a1ee1697b5b110de9 (patch)
tree793396eaf3f0bb1ccdb142ee6aa5014e14d22875
parent3144d7a2daa37e9570d708f14e4d3703ea759e72 (diff)
downloadbcm5719-llvm-dbb4322e511b6be756c8fd0a1ee1697b5b110de9.tar.gz
bcm5719-llvm-dbb4322e511b6be756c8fd0a1ee1697b5b110de9.zip
[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. llvm-svn: 362510
-rw-r--r--lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
index e4d5ff0d353..af54115c2db 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
@@ -736,7 +736,6 @@ bool x86AssemblyInspectionEngine::pc_rel_branch_or_jump_p (
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_branch_or_jump_p (
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
OpenPOWER on IntegriCloud