fix(managed): retain raw CIL changes in member comparison (#2912)
This commit is contained in:
@@ -73,7 +73,11 @@ const methodDimensions = (
|
||||
if (bothAbsent) return { dimensions, bodyUnknown: false };
|
||||
if (!leftBodyComplete || !rightBodyComplete)
|
||||
return { dimensions, bodyUnknown: true };
|
||||
if (left.body.normalized_il_sha256 !== right.body.normalized_il_sha256)
|
||||
// The decoded fingerprint omits switch targets and is not exact CIL identity.
|
||||
if (
|
||||
left.body.il_sha256 !== right.body.il_sha256 ||
|
||||
left.body.normalized_il_sha256 !== right.body.normalized_il_sha256
|
||||
)
|
||||
dimensions.push("cil");
|
||||
if (
|
||||
canonicalize(left.body.opcode_counts) !==
|
||||
|
||||
@@ -49,10 +49,13 @@ interface Ambiguous<Item> {
|
||||
const keyMethod = (item: Method): Keyed<Method> => ({
|
||||
item,
|
||||
exactKey:
|
||||
item.body.status === "present" && item.body.normalized_il_sha256 !== null
|
||||
item.body.status === "present" &&
|
||||
item.body.il_sha256 !== null &&
|
||||
item.body.normalized_il_sha256 !== null
|
||||
? sha256([
|
||||
"method-exact",
|
||||
item.signature.raw_sha256,
|
||||
item.body.il_sha256,
|
||||
item.body.normalized_il_sha256,
|
||||
])
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user