Skip to content

Commit b99c691

Browse files
committed
WIP: Attempt to appease the nondeterminism gods
1 parent c4bf682 commit b99c691

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/warp/src/cache/guid.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ where
4949
// TODO: Implied constraints, symbol name, image offset
5050
let cs_constraints = cached_call_site_constraints(function);
5151
let adj_constraints = cached_adjacency_constraints(function, filter);
52-
cs_constraints.union(&adj_constraints).cloned().collect()
52+
cs_constraints.union(&adj_constraints).copied().collect()
5353
}
5454

5555
pub fn cached_call_site_constraints(function: &BNFunction) -> HashSet<Constraint> {
@@ -151,7 +151,9 @@ impl ConstraintBuilder {
151151
offset: i64,
152152
) -> Vec<Constraint> {
153153
let mut constraints = vec![];
154-
if let Some(guid) = try_cached_function_guid(function) {
154+
// NOTE: Previously we only queried the GUID if it was cached, however, this caused issues with
155+
// functions that were not analyzed yet. We now always query the GUID and cache it if it is not cached.
156+
if let Some(guid) = cached_function_guid(function, || function.lifted_il_if_available()) {
155157
let guid_constraint = Constraint::from_function(&guid, Some(offset));
156158
constraints.push(guid_constraint);
157159
}

0 commit comments

Comments
 (0)