[Libreoffice-commits] core.git: external/lpsolve
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 22 14:51:30 UTC 2019
external/lpsolve/lpsolve-ubsan.patch.0 | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 65b239f8cab7e5a82438a617d8d9e022fc441138
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Oct 22 11:54:02 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Oct 22 16:50:31 2019 +0200
external/lpsolve: Avoid UBSan nullptr-with-nonzero-offset
...(new with Clang 10 trunk), as seen during CppunitTest_sccomp_solver:
> ../lp_presolve.c:171:34: runtime error: applying non-zero offset 8 to null pointer
> #0 in presolve_rebuildUndo at workdir/UnpackedTarball/lpsolve/lpsolve55/../lp_presolve.c:171:34
> #1 in postsolve at workdir/UnpackedTarball/lpsolve/lpsolve55/../lp_presolve.c:5673:5
> #2 in spx_solve at workdir/UnpackedTarball/lpsolve/lpsolve55/../lp_simplex.c:2067:9
> #3 in lin_solve at workdir/UnpackedTarball/lpsolve/lpsolve55/../lp_simplex.c:2159:12
> #4 in LpsolveSolver::solve() at sccomp/source/solver/LpsolveSolver.cxx:295:19
> #5 in (anonymous namespace)::LpSolverTest::testSolver(rtl::OUString const&) at sccomp/qa/unit/solver.cxx:106:14
> #6 in (anonymous namespace)::LpSolverTest::testLpSolver() at sccomp/qa/unit/solver.cxx:69:5
I have no idea whether this even remotely resembles a useful fix, though.
Change-Id: I1a2796d3849967576f400737082e7377566aece9
Reviewed-on: https://gerrit.libreoffice.org/81321
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/external/lpsolve/lpsolve-ubsan.patch.0 b/external/lpsolve/lpsolve-ubsan.patch.0
index 29e9ad3b3c1a..7a5e308c6efd 100644
--- a/external/lpsolve/lpsolve-ubsan.patch.0
+++ b/external/lpsolve/lpsolve-ubsan.patch.0
@@ -1,3 +1,14 @@
+--- lp_presolve.c
++++ lp_presolve.c
+@@ -168,7 +168,7 @@
+ if(isprimal) {
+ if(psdata->primalundo != NULL)
+ mat = psdata->primalundo->tracker;
+- solution = lp->full_solution + lp->presolve_undo->orig_rows;
++ solution = lp->full_solution == NULL ? NULL : lp->full_solution + lp->presolve_undo->orig_rows;
+ slacks = lp->full_solution;
+ }
+ else {
--- lp_pricePSE.c
+++ lp_pricePSE.c
@@ -145,7 +147,7 @@
More information about the Libreoffice-commits
mailing list