Skip to content

Commit

Permalink
[CP-SAT] fix fuzzer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Nov 15, 2024
1 parent 8b79dbc commit 84fdd0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ortools/sat/cp_model_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,11 @@ std::string ValidateSearchStrategies(const CpModelProto& model) {
" has a domain too large to be used in a"
" SELECT_MEDIAN_VALUE value selection strategy");
}
if (PossibleIntegerOverflow(model, {ref}, {1})) {
// This will become an overflow if translated to an expr.
return absl::StrCat("Possible integer overflow in strategy: ",
ProtobufShortDebugString(strategy));
}
}
for (const LinearExpressionProto& expr : strategy.exprs()) {
for (const int var : expr.vars()) {
Expand Down

0 comments on commit 84fdd0d

Please sign in to comment.