From 881318f0321c196ca5d87639e6e05796c39f04da Mon Sep 17 00:00:00 2001 From: Michael Krasnitski Date: Wed, 21 Feb 2024 18:49:52 -0500 Subject: Use BTreeMap for jump targets to ensure deterministic iteration order --- rust/src/mlil/lift.rs | 4 ++-- rust/src/mlil/operation.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src') diff --git a/rust/src/mlil/lift.rs b/rust/src/mlil/lift.rs index e9ae54bc..ba434d15 100644 --- a/rust/src/mlil/lift.rs +++ b/rust/src/mlil/lift.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::BTreeMap; use crate::rc::Ref; use crate::types::{ConstantData, ILIntrinsic, SSAVariable, Variable}; @@ -15,7 +15,7 @@ pub enum MediumLevelILLiftedOperand { Float(f64), Int(u64), IntList(Vec), - TargetMap(HashMap), + TargetMap(BTreeMap), Var(Variable), VarList(Vec), VarSsa(SSAVariable), diff --git a/rust/src/mlil/operation.rs b/rust/src/mlil/operation.rs index fdeaaf1b..822688a6 100644 --- a/rust/src/mlil/operation.rs +++ b/rust/src/mlil/operation.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::BTreeMap; use crate::types::{ConstantData, ILIntrinsic, SSAVariable, Variable}; @@ -129,7 +129,7 @@ pub struct JumpTo { #[derive(Clone, Debug, PartialEq)] pub struct LiftedJumpTo { pub dest: Box, - pub targets: HashMap, + pub targets: BTreeMap, } // GOTO -- cgit v1.3.1