-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Ghidra HEAD to commit 7ddd8665b (#294)
Changed files: ``` M Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc M Ghidra/Features/Decompiler/src/decompile/cpp/cover.cc M Ghidra/Features/Decompiler/src/decompile/cpp/cpool.cc M Ghidra/Features/Decompiler/src/decompile/cpp/double.cc M Ghidra/Features/Decompiler/src/decompile/cpp/filemanage.cc M Ghidra/Features/Decompiler/src/decompile/cpp/flow.cc M Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc M Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.cc M Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.hh M Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.cc M Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc M Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc M Ghidra/Features/Decompiler/src/decompile/cpp/grammar.y M Ghidra/Features/Decompiler/src/decompile/cpp/heritage.cc M Ghidra/Features/Decompiler/src/decompile/cpp/heritage.hh M Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc M Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.hh M Ghidra/Features/Decompiler/src/decompile/cpp/jumptable.cc M Ghidra/Features/Decompiler/src/decompile/cpp/jumptable.hh M Ghidra/Features/Decompiler/src/decompile/cpp/merge.cc M Ghidra/Features/Decompiler/src/decompile/cpp/merge.hh M Ghidra/Features/Decompiler/src/decompile/cpp/op.cc M Ghidra/Features/Decompiler/src/decompile/cpp/op.hh M Ghidra/Features/Decompiler/src/decompile/cpp/paramid.cc M Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc M Ghidra/Features/Decompiler/src/decompile/cpp/test.cc M Ghidra/Features/Decompiler/src/decompile/cpp/type.cc M Ghidra/Features/Decompiler/src/decompile/cpp/type.hh M Ghidra/Features/Decompiler/src/decompile/cpp/typeop.cc M Ghidra/Features/Decompiler/src/decompile/cpp/types.h M Ghidra/Features/Decompiler/src/decompile/cpp/variable.cc A Ghidra/Features/Decompiler/src/decompile/datatests/revisit.xml A Ghidra/Features/Decompiler/src/decompile/datatests/switchloop.xml A Ghidra/Features/Decompiler/src/decompile/datatests/switchmulti.xml M Ghidra/Processors/ARM/src/test.processors/java/ghidra/test/processors/ARM_v8m_O0_EmulatorTest.java M Ghidra/Processors/ARM/src/test.processors/java/ghidra/test/processors/ARM_v8m_O3_EmulatorTest.java ``` --------- Co-authored-by: Eric Kilmer <[email protected]>
- Loading branch information
1 parent
45e124c
commit c3a84c5
Showing
6 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From fc4ac7901ae08cd018d94ce78027cd6636251d39 Mon Sep 17 00:00:00 2001 | ||
From 76289be82722d1a076bb9718507ce57748b40543 Mon Sep 17 00:00:00 2001 | ||
From: Eric Kilmer <[email protected]> | ||
Date: Mon, 12 Aug 2024 12:02:35 -0400 | ||
Subject: [PATCH 1/5] Fix UBSAN errors in decompiler | ||
|
@@ -18,7 +18,7 @@ Co-authored-by: Alex Cameron <[email protected]> | |
10 files changed, 49 insertions(+), 19 deletions(-) | ||
|
||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc | ||
index 6ebec206c9..e5a1ad598c 100644 | ||
index d78b78731c..caf4b24d15 100644 | ||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc | ||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc | ||
@@ -2868,8 +2868,12 @@ void ProtoModelMerged::decode(Decoder &decoder) | ||
|
@@ -37,7 +37,7 @@ index 6ebec206c9..e5a1ad598c 100644 | |
|
||
void ParameterBasic::setTypeLock(bool val) | ||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc | ||
index d76a799960..37ba971a34 100644 | ||
index d51460be84..45bf394862 100644 | ||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc | ||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc | ||
@@ -666,7 +666,11 @@ uintb PcodeOp::getNZMaskLocal(bool cliploop) const | ||
|
@@ -116,7 +116,7 @@ index ca9d71ab99..85d4dd281d 100644 | |
return res; | ||
} | ||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc | ||
index f667c6ca95..6ea3916520 100644 | ||
index bfca3d6ee5..5819bcd732 100644 | ||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc | ||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc | ||
@@ -977,7 +977,12 @@ int4 RulePullsubIndirect::applyOp(PcodeOp *op,Funcdata &data) | ||
|
@@ -133,7 +133,7 @@ index f667c6ca95..6ea3916520 100644 | |
consume = ~consume; | ||
if ((consume & indir->getIn(0)->getConsume())!=0) return 0; | ||
|
||
@@ -7026,8 +7031,9 @@ int4 RulePtrsubCharConstant::applyOp(PcodeOp *op,Funcdata &data) | ||
@@ -7028,8 +7033,9 @@ int4 RulePtrsubCharConstant::applyOp(PcodeOp *op,Funcdata &data) | ||
Varnode *sb = op->getIn(0); | ||
Datatype *sbType = sb->getTypeReadFacing(op); | ||
if (sbType->getMetatype() != TYPE_PTR) return 0; | ||
|
@@ -145,7 +145,7 @@ index f667c6ca95..6ea3916520 100644 | |
Varnode *vn1 = op->getIn(1); | ||
if (!vn1->isConstant()) return 0; | ||
Varnode *outvn = op->getOut(); | ||
@@ -8831,7 +8837,11 @@ int4 RuleSubvarSubpiece::applyOp(PcodeOp *op,Funcdata &data) | ||
@@ -8833,7 +8839,11 @@ int4 RuleSubvarSubpiece::applyOp(PcodeOp *op,Funcdata &data) | ||
Varnode *outvn = op->getOut(); | ||
int4 flowsize = outvn->getSize(); | ||
uintb mask = calc_mask( flowsize ); | ||
|
@@ -206,10 +206,10 @@ index 50d85e22ba..9f3b456229 100644 | |
msg << " Label <" << sym->getName() << "> was placed but not used" << endl; | ||
else if (!sym->isPlaced()) | ||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc | ||
index 7cda43127f..20a5bc1c83 100644 | ||
index 59dcc55949..5944db5905 100644 | ||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc | ||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc | ||
@@ -3661,8 +3661,8 @@ void TypeFactory::recalcPointerSubmeta(Datatype *base,sub_metatype sub) | ||
@@ -3658,8 +3658,8 @@ void TypeFactory::recalcPointerSubmeta(Datatype *base,sub_metatype sub) | ||
top.submeta = sub; // Search on the incorrect submeta | ||
iter = tree.lower_bound(&top); | ||
while(iter != tree.end()) { | ||
|
2 changes: 1 addition & 1 deletion
2
src/patches/HEAD/0002-Use-stroull-instead-of-stroul-to-parse-address-offse.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 1e334bf169139dd1dcbf8e92c992b702b027b3b1 Mon Sep 17 00:00:00 2001 | ||
From 2e4706231191395dac90b764ce29c55de29ca2ce Mon Sep 17 00:00:00 2001 | ||
From: Alex Cameron <[email protected]> | ||
Date: Wed, 3 Aug 2022 20:01:18 +1000 | ||
Subject: [PATCH 2/5] Use `stroull` instead of `stroul` to parse address | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 832fb17127459f0fe6bb141dd499d94dfd6f4e6f Mon Sep 17 00:00:00 2001 | ||
From 26a110b55617237c910447b576752fa0acb6a146 Mon Sep 17 00:00:00 2001 | ||
From: Eric Kilmer <[email protected]> | ||
Date: Sat, 30 Mar 2024 18:46:16 -0400 | ||
Subject: [PATCH 3/5] Add missing index check to prevent errors in Windows | ||
|
@@ -9,10 +9,10 @@ Not sure why this only appears when testing on Windows. | |
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc | ||
index 0237adb820..5048a9d480 100644 | ||
index 455d35bffe..04bc55619c 100644 | ||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc | ||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc | ||
@@ -1844,7 +1844,7 @@ void IfcProtooverride::execute(istream &s) | ||
@@ -1848,7 +1848,7 @@ void IfcProtooverride::execute(istream &s) | ||
s >> ws; | ||
Address callpoint(parse_machaddr(s,discard,*dcp->conf->types)); | ||
int4 i; | ||
|
2 changes: 1 addition & 1 deletion
2
src/patches/HEAD/0004-Use-string-resize-instead-of-reserve.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 0d09640f2d770db6cac6f9a02f5d85373477e5a9 Mon Sep 17 00:00:00 2001 | ||
From d7f7be313580a6e0eef101848a3c86e3a3db4029 Mon Sep 17 00:00:00 2001 | ||
From: Eric Kilmer <[email protected]> | ||
Date: Tue, 29 Oct 2024 15:30:57 -0400 | ||
Subject: [PATCH 4/5] Use string resize instead of reserve | ||
|
2 changes: 1 addition & 1 deletion
2
src/patches/HEAD/0005-Ignore-floating-point-test-due-to-compilation-differ.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 5fe91a722d58d4852f5ffadb420eb81627fd914e Mon Sep 17 00:00:00 2001 | ||
From a76b69021f34973973487362cb5f25f7644880b8 Mon Sep 17 00:00:00 2001 | ||
From: Eric Kilmer <[email protected]> | ||
Date: Tue, 29 Oct 2024 17:51:09 -0400 | ||
Subject: [PATCH 5/5] Ignore floating point test due to compilation differences | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters