Describe the bug
There are several out-of-bounds accesses in cuop:. Two easy ones to trigger are:
- In
compute_max_variable_violation, it is assumed that variable_lower_bounds variable_upper_bounds and assignment are of size at least n_variables. This fails to be the case when there are free variables. to the problem's lower/upper bounds and the solution's assignment arrays.
- in
has_variable_bounds_violation, a similar thing happens.
There are other cases when those types of issues are caught by existing assertions, e.g. in repair_solution, I'm surprised those were not caught in unit tests by the build bots ?
Steps/Code to reproduce bug
A bunch of tests show the issue. For example, run bound_standardization_test with assertions on.
Expected behavior
No out-of-bound accesses
Environment details (please complete the following information):
- Environment location: Custom
- Method of cuOpt install: from source
Additional context
#146
Describe the bug
There are several out-of-bounds accesses in cuop:. Two easy ones to trigger are:
compute_max_variable_violation, it is assumed thatvariable_lower_boundsvariable_upper_boundsandassignmentare of size at leastn_variables. This fails to be the case when there are free variables. to the problem's lower/upper bounds and the solution's assignment arrays.has_variable_bounds_violation, a similar thing happens.There are other cases when those types of issues are caught by existing assertions, e.g. in repair_solution, I'm surprised those were not caught in unit tests by the build bots ?
Steps/Code to reproduce bug
A bunch of tests show the issue. For example, run
bound_standardization_testwith assertions on.Expected behavior
No out-of-bound accesses
Environment details (please complete the following information):
Additional context
#146