Work around out-of-bounds vector access
This commit is contained in:
parent
3b6ae06355
commit
0d321955c9
@ -69,3 +69,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
rowranges[r].start += shift;
|
rowranges[r].start += shift;
|
||||||
|
--- papilo-2.2.0/src/papilo/presolvers/ParallelColDetection.hpp.orig 2024-02-19 15:44:49.657384704 -0700
|
||||||
|
+++ papilo-2.2.0/src/papilo/presolvers/ParallelColDetection.hpp 2024-03-06 06:48:56.980339757 -0700
|
||||||
|
@@ -588,13 +588,16 @@ ParallelColDetection<REAL>::execute( con
|
||||||
|
bool flag_b_integer = cflags[b].test( ColFlag::kIntegral );
|
||||||
|
if( flag_a_integer != flag_b_integer )
|
||||||
|
return !flag_a_integer;
|
||||||
|
+ SparseVectorView<REAL> coeffs_a = constMatrix.getColumnCoefficients( a );
|
||||||
|
+ SparseVectorView<REAL> coeffs_b = constMatrix.getColumnCoefficients( b );
|
||||||
|
+ REAL coeff_a = (coeffs_a.getLength() > 0) ? coeffs_a.getValues()[0] : (REAL)0;
|
||||||
|
+ REAL coeff_b = (coeffs_b.getLength() > 0) ? coeffs_b.getValues()[0] : (REAL)0;
|
||||||
|
return // sort by scale factor
|
||||||
|
abs( obj[a] ) < abs( obj[b] ) ||
|
||||||
|
// sort by scale factor if obj is zero
|
||||||
|
( abs( obj[a] ) == abs( obj[b] ) && obj[a] == 0 &&
|
||||||
|
determineOderingForZeroObj(
|
||||||
|
- constMatrix.getColumnCoefficients( a ).getValues()[0],
|
||||||
|
- constMatrix.getColumnCoefficients( b ).getValues()[0],
|
||||||
|
+ coeff_a, coeff_b,
|
||||||
|
colperm[a], colperm[b] ) ) ||
|
||||||
|
// sort by permutation
|
||||||
|
( abs( obj[a] ) == abs( obj[b] ) && obj[a] != 0 &&
|
||||||
|
@ -30,6 +30,7 @@ Patch1: %{name}-shared.patch
|
|||||||
# The list of tests in CMakeLists.txt doesn't match the actual tests
|
# The list of tests in CMakeLists.txt doesn't match the actual tests
|
||||||
Patch2: %{name}-test.patch
|
Patch2: %{name}-test.patch
|
||||||
# Avoid out-of-bounds vector access
|
# Avoid out-of-bounds vector access
|
||||||
|
# https://github.com/scipopt/papilo/pull/48
|
||||||
Patch3: %{name}-vector-bounds.patch
|
Patch3: %{name}-vector-bounds.patch
|
||||||
|
|
||||||
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||||
@ -56,9 +57,6 @@ BuildRequires: cmake(soplex)
|
|||||||
|
|
||||||
Requires: libpapilo%{?_isa} = %{version}-%{release}
|
Requires: libpapilo%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
# The bundled version of fmt is incompatible with version 10 in Rawhide.
|
|
||||||
Provides: bundled(fmt) = 6.1.2
|
|
||||||
|
|
||||||
%global _desc %{expand:
|
%global _desc %{expand:
|
||||||
PaPILO provides parallel presolve routines for (mixed integer) linear
|
PaPILO provides parallel presolve routines for (mixed integer) linear
|
||||||
programming problems. The routines are implemented using templates
|
programming problems. The routines are implemented using templates
|
||||||
@ -70,6 +68,9 @@ the boost multiprecision package.}
|
|||||||
%package -n libpapilo
|
%package -n libpapilo
|
||||||
Summary: Library interface to PaPILO
|
Summary: Library interface to PaPILO
|
||||||
|
|
||||||
|
# The bundled version of fmt is incompatible with version 10 in Rawhide.
|
||||||
|
Provides: bundled(fmt) = 6.1.2
|
||||||
|
|
||||||
%description -n libpapilo %_desc
|
%description -n libpapilo %_desc
|
||||||
|
|
||||||
This package provides a library interface to the PaPILO functionality.
|
This package provides a library interface to the PaPILO functionality.
|
||||||
|
Loading…
Reference in New Issue
Block a user