scipopt / soplex

Sequential object-oriented simPlex
Other
59 stars 18 forks source link

Avoid reading uninitialized value #37

Closed jamesjer closed 6 months ago

jamesjer commented 6 months ago

I am seeing test segfaults on the Fedora aarch64 builders with soplex 7.0.0. The reason is that the copy constructor for SoPlexBase calls operator=, which compares _rationalLP to nullptr at line 1546 of src/soplex.hpp, but the copy constructor did not initialize _rationalLP, so it contains arbitrary bytes. On the x86_64 builders, we always seem to get lucky; _rationalLP is filled with zeroes. This PR ensures that is the case on all architectures.

leoneifler commented 6 months ago

Thanks for this fix, closing and will be mirrored soon 👍