Skip to content

[BUG] Lots of array out-of-bound accesses #150

@legrosbuffle

Description

@legrosbuffle

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions