Skip to content

Commit

Permalink
Merge branch 'master' into cron/update-ghidra-7ddd8665b
Browse files Browse the repository at this point in the history
* master:
  Ghidra 11.2 (#296)
  Update Ghidra HEAD to commit fd1a448bf (#290)
  Ghidra 11.1.2 (#295)
  Update Ghidra HEAD to commit a1db2dac1 (#274)
  • Loading branch information
ekilmer committed Oct 30, 2024
2 parents 4695b1b + 45e124c commit 3c14640
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 88 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ set(public_include_header_list
"${library_root}/compression.hh"
"${library_root}/multiprecision.hh"
"${library_root}/slaformat.hh"
"${library_root}/constseq.hh"
)
if(sleigh_RELEASE_IS_HEAD)
list(APPEND public_include_header_list
"${library_root}/constseq.hh"
)
endif()
#if(sleigh_RELEASE_IS_HEAD)
# list(APPEND public_include_header_list
# )
#endif()
# Create custom target so that IDEs know these files are part of the sources
add_custom_target(sleigh_all_headers SOURCES ${public_include_header_list})
set(public_headers_dir ${CMAKE_CURRENT_BINARY_DIR}/include)
Expand Down
24 changes: 12 additions & 12 deletions src/patches/HEAD/0001-Fix-UBSAN-errors-in-decompiler.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 692408998944223ca7d531899e2e602bc7dae3fe 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/3] Fix UBSAN errors in decompiler
Subject: [PATCH 1/5] Fix UBSAN errors in decompiler

Co-authored-by: Alex Cameron <[email protected]>
---
Expand All @@ -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 65c1cc7889..cb3284b787 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)
Expand All @@ -37,7 +37,7 @@ index 65c1cc7889..cb3284b787 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 74a62950c8..bc21d20250 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
Expand Down Expand Up @@ -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 b6d5aaa461..ff1e9a10d7 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)
Expand All @@ -133,7 +133,7 @@ index b6d5aaa461..ff1e9a10d7 100644
consume = ~consume;
if ((consume & indir->getIn(0)->getConsume())!=0) return 0;

@@ -6785,8 +6790,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;
Expand All @@ -145,7 +145,7 @@ index b6d5aaa461..ff1e9a10d7 100644
Varnode *vn1 = op->getIn(1);
if (!vn1->isConstant()) return 0;
Varnode *outvn = op->getOut();
@@ -8590,7 +8596,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 );
Expand Down Expand Up @@ -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 04a5bdce7c..5b9aeb7c04 100644
index 59dcc55949..5944db5905 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc
@@ -3590,8 +3590,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()) {
Expand All @@ -220,10 +220,10 @@ index 04a5bdce7c..5b9aeb7c04 100644
++iter;
if (ptr->submeta == sub) {
diff --git a/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc b/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
index c35bde8774..061e536775 100644
index 2571f55f1a..fe40e22b1b 100644
--- a/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
@@ -346,7 +346,7 @@ TEST(float_opTrunc_to_int) {
@@ -375,7 +375,7 @@ TEST(float_opTrunc_to_int) {

for(float f:float_test_values) {
// avoid undefined behavior
Expand All @@ -233,5 +233,5 @@ index c35bde8774..061e536775 100644
uintb true_result = ((uintb)(int32_t)f) & 0xffffffff;
uintb encoding = format.getEncoding(f);
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From b7681c6a2b68b27323bf4ad79fb3501d7f067c4d 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/3] Use `stroull` instead of `stroul` to parse address
Subject: [PATCH 2/5] Use `stroull` instead of `stroul` to parse address
offsets

---
Ghidra/Features/Decompiler/src/decompile/cpp/space.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
index bda09fc94c..d077ee375e 100644
index dbaa2e775f..72927bf379 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
@@ -16,6 +16,8 @@
Expand All @@ -21,7 +21,7 @@ index bda09fc94c..d077ee375e 100644
namespace ghidra {

AttributeId ATTRIB_BASE = AttributeId("base",89);
@@ -274,7 +276,10 @@ uintb AddrSpace::read(const string &s,int4 &size) const
@@ -277,7 +279,10 @@ uintb AddrSpace::read(const string &s,int4 &size) const
}
}
catch(LowlevelError &err) { // Name doesn't exist
Expand All @@ -34,5 +34,5 @@ index bda09fc94c..d077ee375e 100644
enddata = (const char *) tmpdata;
if (enddata - s.c_str() == s.size()) { // If no size or offset override
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 0be97746f512af054a0428cdddb9b6b8445b6ccf 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/3] Add missing index check to prevent errors in Windows
Subject: [PATCH 3/5] Add missing index check to prevent errors in Windows

Not sure why this only appears when testing on Windows.
---
Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc | 2 +-
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;
Expand All @@ -22,5 +22,5 @@ index 0237adb820..5048a9d480 100644
if (i == dcp->fd->numCalls())
throw IfaceExecutionError("No call is made at this address");
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b341ea2dda57050343de4a52602541c754df076d 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] Use string resize instead of reserve
Subject: [PATCH 4/5] Use string resize instead of reserve

assign will fix up the size to hold all of what's copied
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 355f0f745f80a01edd2dbaa363463ebb29268589 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] Ignore floating point test due to compilation differences
Subject: [PATCH 5/5] Ignore floating point test due to compilation differences

This test fails on macOS and Windows. I'm unsure whether it's an OS or
compiler issue.
Expand Down
63 changes: 22 additions & 41 deletions src/patches/stable/0001-Fix-UBSAN-errors-in-decompiler.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From 6c36965500d26d5a35dfbc91725956ae1d51e394 Mon Sep 17 00:00:00 2001
From: Alex Cameron <[email protected]>
Date: Mon, 5 Jun 2023 16:45:04 +1200
From c5a494bcd940fb46ffe90164c5ec0b61d897a892 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

Co-authored-by: Alex Cameron <[email protected]>
---
.../Decompiler/src/decompile/cpp/fspec.cc | 8 ++++++--
.../src/decompile/cpp/funcdata_varnode.cc | 8 +++++++-
.../Decompiler/src/decompile/cpp/op.cc | 6 +++++-
.../Decompiler/src/decompile/cpp/opbehavior.cc | 8 +++++++-
.../src/decompile/cpp/pcodecompile.cc | 18 +++++++++++-------
Expand All @@ -15,13 +15,13 @@ Subject: [PATCH 1/5] Fix UBSAN errors in decompiler
.../src/decompile/cpp/slgh_compile.cc | 2 +-
.../Decompiler/src/decompile/cpp/type.cc | 2 +-
.../src/decompile/unittests/testfloatemu.cc | 2 +-
11 files changed, 56 insertions(+), 20 deletions(-)
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 dc96f0c19..3482cf17c 100644
index 6ebec206c9..e5a1ad598c 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
@@ -2727,8 +2727,12 @@ void ProtoModelMerged::decode(Decoder &decoder)
@@ -2868,8 +2868,12 @@ void ProtoModelMerged::decode(Decoder &decoder)
modellist.push_back(mymodel);
}
decoder.closeElement(elemId);
Expand All @@ -36,27 +36,8 @@ index dc96f0c19..3482cf17c 100644
}

void ParameterBasic::setTypeLock(bool val)
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc
index fc094ee96..1f7e53ebe 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc
@@ -503,7 +503,13 @@ void Funcdata::setHighLevel(void)
void Funcdata::transferVarnodeProperties(Varnode *vn,Varnode *newVn,int4 lsbOffset)

{
- uintb newConsume = (vn->getConsume() >> 8*lsbOffset) & calc_mask(newVn->getSize());
+ uintb newConsume = vn->getConsume();
+ if (8*lsbOffset < sizeof(newConsume)) {
+ newConsume >>= 8*lsbOffset;
+ } else {
+ newConsume = 0;
+ }
+ newConsume &= calc_mask(newVn->getSize());

uint4 vnFlags = vn->getFlags() & (Varnode::directwrite|Varnode::addrforce);

diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc
index 921335173..46cdc39f3 100644
index d76a799960..37ba971a34 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
Expand All @@ -73,7 +54,7 @@ index 921335173..46cdc39f3 100644
break;
case CPUI_INT_MULT:
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc
index aebcfd910..6c47e6eb1 100644
index aebcfd9103..6c47e6eb15 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc
@@ -746,7 +746,13 @@ uintb OpBehaviorPiece::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb i
Expand All @@ -92,7 +73,7 @@ index aebcfd910..6c47e6eb1 100644
}

diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodecompile.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodecompile.cc
index ca9d71ab9..85d4dd281 100644
index ca9d71ab99..85d4dd281d 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodecompile.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodecompile.cc
@@ -621,8 +621,10 @@ vector<OpTpl *> *PcodeCompile::assignBitRange(VarnodeTpl *vn,uint4 bitoffset,uin
Expand Down Expand Up @@ -135,10 +116,10 @@ index ca9d71ab9..85d4dd281 100644
return res;
}
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
index 3703c8ef5..ac6e21c00 100644
index f667c6ca95..6ea3916520 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
@@ -976,7 +976,12 @@ int4 RulePullsubIndirect::applyOp(PcodeOp *op,Funcdata &data)
@@ -977,7 +977,12 @@ int4 RulePullsubIndirect::applyOp(PcodeOp *op,Funcdata &data)
Varnode *outvn = op->getOut();
if (outvn->isPrecisLo()||outvn->isPrecisHi()) return 0; // Don't pull apart double precision object

Expand All @@ -152,7 +133,7 @@ index 3703c8ef5..ac6e21c00 100644
consume = ~consume;
if ((consume & indir->getIn(0)->getConsume())!=0) return 0;

@@ -6803,8 +6808,9 @@ int4 RulePtrsubCharConstant::applyOp(PcodeOp *op,Funcdata &data)
@@ -7026,8 +7031,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;
Expand All @@ -164,7 +145,7 @@ index 3703c8ef5..ac6e21c00 100644
Varnode *vn1 = op->getIn(1);
if (!vn1->isConstant()) return 0;
Varnode *outvn = op->getOut();
@@ -8616,7 +8622,11 @@ int4 RuleSubvarSubpiece::applyOp(PcodeOp *op,Funcdata &data)
@@ -8831,7 +8837,11 @@ int4 RuleSubvarSubpiece::applyOp(PcodeOp *op,Funcdata &data)
Varnode *outvn = op->getOut();
int4 flowsize = outvn->getSize();
uintb mask = calc_mask( flowsize );
Expand All @@ -178,7 +159,7 @@ index 3703c8ef5..ac6e21c00 100644
if (!aggressive) {
if ((vn->getConsume() & mask) != vn->getConsume()) return 0;
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.cc
index cd9b9835b..8a4616c3b 100644
index cd9b9835b1..8a4616c3b9 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.cc
@@ -22,6 +22,7 @@ ConstTpl::ConstTpl(const_type tp)
Expand All @@ -198,7 +179,7 @@ index cd9b9835b..8a4616c3b 100644

bool ConstTpl::isConstSpace(void) const
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.hh
index e0b069959..9117a45c7 100644
index e0b069959d..9117a45c75 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.hh
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.hh
@@ -47,7 +47,7 @@ class ConstTpl {
Expand All @@ -211,7 +192,7 @@ index e0b069959..9117a45c7 100644
type=op2.type; value=op2.value; value_real=op2.value_real; select=op2.select; }
ConstTpl(const_type tp,uintb val);
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc
index c060053bf..c9004023c 100644
index 50d85e22ba..9f3b456229 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc
@@ -2164,8 +2164,8 @@ string SleighCompile::checkSymbols(SymbolScope *scope)
Expand All @@ -225,10 +206,10 @@ index c060053bf..c9004023c 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 e6292e138..bd31b7470 100644
index 7cda43127f..20a5bc1c83 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc
@@ -3561,8 +3561,8 @@ void TypeFactory::recalcPointerSubmeta(Datatype *base,sub_metatype sub)
@@ -3661,8 +3661,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()) {
Expand All @@ -239,10 +220,10 @@ index e6292e138..bd31b7470 100644
++iter;
if (ptr->submeta == sub) {
diff --git a/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc b/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
index c35bde877..061e53677 100644
index 2571f55f1a..fe40e22b1b 100644
--- a/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
@@ -346,7 +346,7 @@ TEST(float_opTrunc_to_int) {
@@ -375,7 +375,7 @@ TEST(float_opTrunc_to_int) {

for(float f:float_test_values) {
// avoid undefined behavior
Expand All @@ -252,5 +233,5 @@ index c35bde877..061e53677 100644
uintb true_result = ((uintb)(int32_t)f) & 0xffffffff;
uintb encoding = format.getEncoding(f);
--
2.44.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 290b06621c7a8c32c1470d16dbd8740876d57640 Mon Sep 17 00:00:00 2001
From 60b1bb423c10b2e53ad72e7b84ac647e56282aca 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
Expand All @@ -9,7 +9,7 @@ Subject: [PATCH 2/5] Use `stroull` instead of `stroul` to parse address
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
index bda09fc94..d077ee375 100644
index dbaa2e775f..72927bf379 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
@@ -16,6 +16,8 @@
Expand All @@ -21,7 +21,7 @@ index bda09fc94..d077ee375 100644
namespace ghidra {

AttributeId ATTRIB_BASE = AttributeId("base",89);
@@ -274,7 +276,10 @@ uintb AddrSpace::read(const string &s,int4 &size) const
@@ -277,7 +279,10 @@ uintb AddrSpace::read(const string &s,int4 &size) const
}
}
catch(LowlevelError &err) { // Name doesn't exist
Expand All @@ -34,5 +34,5 @@ index bda09fc94..d077ee375 100644
enddata = (const char *) tmpdata;
if (enddata - s.c_str() == s.size()) { // If no size or offset override
--
2.44.0
2.47.0

Loading

0 comments on commit 3c14640

Please sign in to comment.