From bdb4d911d554552cf9fd6da95975983ebdc09066 Mon Sep 17 00:00:00 2001 From: clc5q <clc5q@git.zephyr-software.com> Date: Thu, 16 Jul 2015 20:48:28 +0000 Subject: [PATCH] Get rid of uses of IDA Pro stack deltas. Former-commit-id: e1f5edb2d888112864cbef2d3070f1ab14dac642 --- src/base/SMPFunction.cpp | 6 +++--- .../trimmed-sorted-save-busybox.psexe.annot.REMOVED.git-id | 2 +- .../trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id | 2 +- ...ted-save-gnome-keyring-daemon.psexe.annot.REMOVED.git-id | 2 +- .../commit/trimmed-sorted-save-gnome-screenshot.psexe.annot | 4 ++-- .../trimmed-sorted-save-gnome-settings-daemon.psexe.annot | 2 +- .../trimmed-sorted-save-gnome-sound-applet.psexe.annot | 2 +- ...ed-sorted-save-gnome-terminal.psexe.annot.REMOVED.git-id | 2 +- .../trimmed-sorted-save-nginx.psexe.annot.REMOVED.git-id | 2 +- .../trimmed-sorted-save-openssl.psexe.annot.REMOVED.git-id | 2 +- .../trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id | 2 +- tests/commit/trimmed-sorted-save-toy.exe.annot | 2 +- .../trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index 889264d9..b38b9406 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -2010,7 +2010,7 @@ void SMPFunction::SetStackFrameInfo(void) { #endif // Get callee-saved regs info for remediation use. - if (STARS_BADADDR != this->GetFirstFrameAllocInstAddr()) { + if ((STARS_BADADDR != this->GetFirstFrameAllocInstAddr()) && this->StackPtrAnalysisSucceeded()) { this->MDFindSavedRegs(); } @@ -2401,7 +2401,7 @@ void SMPFunction::MDFindSavedRegs(void) { if (!(CurrInst->MDIsPushInstr())) continue; - STARS_sval_t CurrOffset = SMP_get_spd(CurrFunc, CurrInst->GetAddr()); + STARS_sval_t CurrOffset = CurrInst->GetStackPtrOffset(); if (CurrInst->GetIDAOpcode() == STARS_NN_push) { STARSOpndTypePtr PushedReg = CurrInst->GetPushedOpnd(); if (PushedReg->IsRegOp()) { @@ -3611,7 +3611,7 @@ bool SMPFunction::IsInIncomingArgsRegion(SMPInstr *SourceInst, const STARSOpndTy if (InArg) { MDExtractAddressFields(SourceOp, BaseReg, IndexReg, ScaleFactor, offset); int SignedOffset = (int) offset; - if (((BaseReg != STARS_x86_R_sp) && (IndexReg != STARS_x86_R_sp)) || (SignedOffset < 4)) { + if (((BaseReg != STARS_x86_R_sp) && (IndexReg != STARS_x86_R_sp)) || (SignedOffset < global_STARS_program->GetSTARS_ISA_Bytewidth())) { InArg = false; } } diff --git a/tests/commit/trimmed-sorted-save-busybox.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-busybox.psexe.annot.REMOVED.git-id index fcc44084..1eee2b48 100644 --- a/tests/commit/trimmed-sorted-save-busybox.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-busybox.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -721972b7347ad6f796cf5c23192665f5835c7b01 \ No newline at end of file +701f544c2d7e8228add6810fb5833b5ea4955fc6 \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id index 4f6efa0d..546db701 100644 --- a/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -dab5d65a2ccd7482f0ef123cff720df36a28579e \ No newline at end of file +39fe85441a5a3bcacfaa407c53fb0bd3a4f5b93d \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gnome-keyring-daemon.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-gnome-keyring-daemon.psexe.annot.REMOVED.git-id index 9761098c..d788e685 100644 --- a/tests/commit/trimmed-sorted-save-gnome-keyring-daemon.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-gnome-keyring-daemon.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -aa780fa24fda825cff368512de7d3a3fbfeadca6 \ No newline at end of file +1c3d5552e247cbda44aacd98b23f696d00e9cec3 \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gnome-screenshot.psexe.annot b/tests/commit/trimmed-sorted-save-gnome-screenshot.psexe.annot index 2a448db9..be3e6fd1 100644 --- a/tests/commit/trimmed-sorted-save-gnome-screenshot.psexe.annot +++ b/tests/commit/trimmed-sorted-save-gnome-screenshot.psexe.annot @@ -6040,7 +6040,7 @@ 4099ba 4 INSTR DEADREGS EFLAGS R8 R9 R10 R11 R13 R15 ZZ mov [r14+28h], rax 4099be -1 INSTR LOCAL NoMetaUpdate jmp loc_40988B 4099be 5 INSTR BELONGTO 409780 - 4099d0 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 -8 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ + 4099d0 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ 4099d0 0 FUNC MMSAFENESS SAFE 4099d0 171 FUNC GLOBAL sub_4099D0 FUNC_UNSAFE NOFP RET 409a7a 4099d0 1 INSTR BELONGTO 4099d0 @@ -8149,7 +8149,7 @@ 40a8a0 1 INSTR DEADREGS EFLAGS RBX R8 R9 R10 R11 ZZ pop rbx 40a8a1 1 INSTR BELONGTO 40a890 40a8a1 1 INSTR DEADREGS EFLAGS R8 R9 R10 R11 ZZ retn - 40a8b0 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 -8 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ + 40a8b0 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ 40a8b0 0 FUNC MMSAFENESS UNSAFE 40a8b0 1 INSTR BELONGTO 40a8b0 40a8b0 209 FUNC GLOBAL sub_40A8B0 FUNC_UNSAFE NOFP RET 40a980 diff --git a/tests/commit/trimmed-sorted-save-gnome-settings-daemon.psexe.annot b/tests/commit/trimmed-sorted-save-gnome-settings-daemon.psexe.annot index a5907cb5..7404ddb9 100644 --- a/tests/commit/trimmed-sorted-save-gnome-settings-daemon.psexe.annot +++ b/tests/commit/trimmed-sorted-save-gnome-settings-daemon.psexe.annot @@ -2169,7 +2169,7 @@ 403cba -1 INSTR LOCAL NoMetaUpdate jmp _g_log_default_handler 403cc6 -1 INSTR LOCAL NoMetaUpdate test eax, eax 403cc8 -1 INSTR LOCAL NoMetaUpdate jnz short loc_403CBA - 403cd0 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 -16 0 4 0 0 5 -8 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ + 403cd0 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ 403cd0 0 FUNC MMSAFENESS SAFE 403cd0 1 INSTR BELONGTO 403cd0 403cd0 336 FUNC GLOBAL sub_403CD0 FUNC_UNSAFE NOFP RET 403e1f diff --git a/tests/commit/trimmed-sorted-save-gnome-sound-applet.psexe.annot b/tests/commit/trimmed-sorted-save-gnome-sound-applet.psexe.annot index f014e8d3..7a6a52fa 100644 --- a/tests/commit/trimmed-sorted-save-gnome-sound-applet.psexe.annot +++ b/tests/commit/trimmed-sorted-save-gnome-sound-applet.psexe.annot @@ -4824,7 +4824,7 @@ 12e24 -2 INSTR LOCAL n EAX ZZ AlwaysNUM xor eax, eax 12e26 -1 INSTR LOCAL NoMetaUpdate jmp loc_12D4D 12e26 5 INSTR BELONGTO 12d00 - 12e30 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 -16 0 4 0 0 5 -8 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ + 12e30 0 FUNC FRAMERESTORE 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 ZZ 12e30 0 FUNC MMSAFENESS SAFE 12e30 1 INSTR BELONGTO 12e30 12e30 -3 INSTR LOCAL NoWarn push rbp diff --git a/tests/commit/trimmed-sorted-save-gnome-terminal.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-gnome-terminal.psexe.annot.REMOVED.git-id index 0b804455..df046215 100644 --- a/tests/commit/trimmed-sorted-save-gnome-terminal.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-gnome-terminal.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -cba913d1b4abb2ac9f386847ae81828fdac62cea \ No newline at end of file +c9885a611a61b6cd7edba44bae4d63d24ae2b428 \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-nginx.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-nginx.psexe.annot.REMOVED.git-id index f1095eab..e5a7af49 100644 --- a/tests/commit/trimmed-sorted-save-nginx.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-nginx.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -5995d07755f7d33260bfee9e6674cee6cbdce4d2 \ No newline at end of file +080f585bfe04307c6ab2d219c579dc9151093e69 \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-openssl.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-openssl.psexe.annot.REMOVED.git-id index 381bc91f..3ff9bc5c 100644 --- a/tests/commit/trimmed-sorted-save-openssl.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-openssl.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -a800cfe5026abd23ef35a3696caf45016f208a8e \ No newline at end of file +22a1af3717d5f8260c7459f37b4d5145cfa52a40 \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id index f33f5a73..6399d051 100644 --- a/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -8b020f9de6c1499a711a97e2c3b17bedcd11a749 \ No newline at end of file +572f3110b68a52c6b76d19c89d5893b5b1e91b0d \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-toy.exe.annot b/tests/commit/trimmed-sorted-save-toy.exe.annot index c3f8dc15..4bd824d4 100644 --- a/tests/commit/trimmed-sorted-save-toy.exe.annot +++ b/tests/commit/trimmed-sorted-save-toy.exe.annot @@ -237,7 +237,7 @@ 80483b2 1 INSTR BELONGTO 8048390 80483b2 1 INSTR DEADREGS EFLAGS ZZ retn 80483b2 8 DEALLOC STACK esp - 8 retn - 80483b4 0 FUNC FRAMERESTORE 0 0 1 1 -8 8 2 0 0 3 0 0 4 0 8 5 -4 0 6 0 0 7 0 0 ZZ + 80483b4 0 FUNC FRAMERESTORE 0 0 1 1 -12 8 2 0 0 3 0 0 4 0 8 5 -8 0 6 0 0 7 0 0 ZZ 80483b4 0 FUNC MMSAFENESS UNSAFE 80483b4 163 FUNC GLOBAL main FUNC_UNSAFE USEFP RET 8048456 80483b4 4 INSTR BELONGTO 80483b4 diff --git a/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id index 4afe87bc..94df3c57 100644 --- a/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -bdab1b34cb54fdbdb6f66d06adc4ee3bcd93e6fc \ No newline at end of file +969f66c04ca2d4c241dd93af61a3d5de3e24c0d6 \ No newline at end of file -- GitLab