diff --git a/R-proj/DESCRIPTION b/R-proj/DESCRIPTION index c1e1e7e57..55424ed15 100644 --- a/R-proj/DESCRIPTION +++ b/R-proj/DESCRIPTION @@ -12,8 +12,8 @@ Description: Provides an R interface for 'volesti' C++ package. 'volesti' comput for sampling, rounding and rotating polytopes. Moreover, 'volesti' provides algorithms for estimating copulas useful in computational finance. Methods implemented in 'volesti' are described in A. Chalkis and V. Fisikopoulos (2022) and references therein. -Version: 1.1.2-4 -Date: 2022-04-03 +Version: 1.1.2-6 +Date: 2023-04-11 Maintainer: Vissarion Fisikopoulos Depends: Rcpp (>= 0.12.17) Imports: methods, stats diff --git a/R-proj/src/Rproj_externals/lp_solve/lp_presolve.c b/R-proj/src/Rproj_externals/lp_solve/lp_presolve.c index 5e99f20e4..0a98e421f 100644 --- a/R-proj/src/Rproj_externals/lp_solve/lp_presolve.c +++ b/R-proj/src/Rproj_externals/lp_solve/lp_presolve.c @@ -32,8 +32,6 @@ initial version of column aggregation code. ------------------------------------------------------------------------- */ -//Modified by Apostolos Chalkis in May of 2020. - #include #include "commonlib.h" #include "lp_lib.h" @@ -170,13 +168,17 @@ STATIC MYBOOL presolve_rebuildUndo(lprec *lp, MYBOOL isprimal) if(isprimal) { if(psdata->primalundo != NULL) mat = psdata->primalundo->tracker; - solution = lp->full_solution + lp->presolve_undo->orig_rows; // Comment out by Apostolos Chalkis + if(mat == NULL) + return( FALSE ); + solution = lp->full_solution + lp->presolve_undo->orig_rows; slacks = lp->full_solution; } else { if(psdata->dualundo != NULL) mat = psdata->dualundo->tracker; - solution = lp->full_duals; // Comment out by Apostolos Chalkis + if(mat == NULL) + return( FALSE ); + solution = lp->full_duals; slacks = lp->full_duals + lp->presolve_undo->orig_rows; } if(mat == NULL) diff --git a/cran_gen/Makevars b/cran_gen/Makevars index 9cd75bcae..07c17c906 100644 --- a/cran_gen/Makevars +++ b/cran_gen/Makevars @@ -1,6 +1,5 @@ PKG_CPPFLAGS=-Iexternal -Iexternal/lpsolve/headers/run_headers -Iexternal/minimum_ellipsoid -Iinclude -Iinclude/convex_bodies/spectrahedra PKG_CXXFLAGS= -DBOOST_NO_AUTO_PTR -CXX_STD = CXX11 PKG_LIBS=-Lexternal/lpsolve/build/lp_solve -llp_solve $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/cran_gen/Makevars.win b/cran_gen/Makevars.win index 723f4e650..29935f2a1 100644 --- a/cran_gen/Makevars.win +++ b/cran_gen/Makevars.win @@ -1,6 +1,5 @@ PKG_CPPFLAGS=-Iexternal -Iexternal/lpsolve/headers/run_headers -Iexternal/minimum_ellipsoid -Iinclude -Iinclude/convex_bodies/spectrahedra PKG_CXXFLAGS= -lm -ldl -DBOOST_NO_AUTO_PTR -CXX_STD = CXX11 PKG_LIBS=-Lexternal/lpsolve/build/lp_solve -llp_solve $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/cran_gen/NEWS.md b/cran_gen/NEWS.md index 181232de2..e3329b9f9 100644 --- a/cran_gen/NEWS.md +++ b/cran_gen/NEWS.md @@ -45,4 +45,8 @@ # volesti 1.1.2-4 -- Remove uninitialized warning in clang-16 (lp_presolve) \ No newline at end of file +- Remove uninitialized warning in clang-16 (lp_presolve) + +# volesti 1.1.2-6 + +- Fix UBSAN issues (lp_presolve)