-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch for strict weak ordering in type comparison
Fixes Windows Debug builds
- Loading branch information
Showing
6 changed files
with
45 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
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
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
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
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
30 changes: 30 additions & 0 deletions
30
src/patches/HEAD/0006-decompiler-Fix-inconsistency-in-type-comparison-oper.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 6b57f1fc8e23c2e72afb05750d6ca11e94af9812 Mon Sep 17 00:00:00 2001 | ||
From: Eric Kilmer <eric.d.kilmer@gmail.com> | ||
Date: Sat, 4 Jan 2025 16:50:52 -0500 | ||
Subject: [PATCH 6/6] decompiler: Fix inconsistency in type comparison operator | ||
|
||
More specific class implementations straight return res instead of | ||
returning the comparison to zero | ||
|
||
This fixes an error in a Debug build on Windows for a strict weak | ||
ordering error at runtime in the tests. | ||
--- | ||
Ghidra/Features/Decompiler/src/decompile/cpp/type.hh | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/type.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/type.hh | ||
index 95ceaf9bb1..d677e63bee 100644 | ||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/type.hh | ||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/type.hh | ||
@@ -306,7 +306,7 @@ struct DatatypeCompare { | ||
/// Comparison operator | ||
bool operator()(const Datatype *a,const Datatype *b) const { | ||
int4 res = a->compareDependency(*b); | ||
- if (res != 0) return (res<0); | ||
+ if (res != 0) return res; | ||
return a->getId() < b->getId(); } | ||
}; | ||
|
||
-- | ||
2.47.1 | ||
|