Skip to content

Commit b89f441

Browse files
authored
Check constraints for Def operands in the checker (#150)
This was previously skipped: only Use operands were checked to ensure they had a valid allocation for their constraint. No new fuzzbugs found, I just noticed this while looking over the checker.
1 parent 4b136d6 commit b89f441

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/checker.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl CheckerState {
445445
return Err(CheckerError::MissingAllocation { inst, op });
446446
}
447447

448-
if op.as_fixed_nonallocatable().is_none() {
448+
if op.kind() == OperandKind::Use && op.as_fixed_nonallocatable().is_none() {
449449
match val {
450450
CheckerValue::Universe => {
451451
return Err(CheckerError::UnknownValueInAllocation { inst, op, alloc });
@@ -506,9 +506,6 @@ impl CheckerState {
506506
if !is_here {
507507
continue;
508508
}
509-
if op.kind() == OperandKind::Def {
510-
continue;
511-
}
512509

513510
let val = self.get_value(alloc).unwrap_or(&default_val);
514511
trace!(

0 commit comments

Comments
 (0)