[Libreoffice-commits] core.git: external/lpsolve
external/lpsolve/lpsolve-ubsan.patch.0 | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 65b239f8cab7e5a82438a617d8d9e022fc441138 Author: Stephan Bergmann AuthorDate: Tue Oct 22 11:54:02 2019 +0200 Commit: Stephan Bergmann 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 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 @@ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: external/lpsolve
external/lpsolve/ExternalProject_lpsolve.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit eda3beff19f95c634fa6f0320e7ab0f942f51f3e Author: Stephan Bergmann sberg...@redhat.com Date: Tue Aug 12 10:18:55 2014 +0200 Let building lpsolve fail when its ccc script fails (hopefully, the various ccc script variants do not include code that would unintentionally fail the script with -e) Change-Id: Ia04291983d99a8cf5a74e6a0078e179c17a93f2b diff --git a/external/lpsolve/ExternalProject_lpsolve.mk b/external/lpsolve/ExternalProject_lpsolve.mk index e0a9e46..a40ada4 100644 --- a/external/lpsolve/ExternalProject_lpsolve.mk +++ b/external/lpsolve/ExternalProject_lpsolve.mk @@ -33,7 +33,7 @@ else # $(OS)!=WNT $(call gb_ExternalProject_get_state_target,lpsolve,build): $(call gb_ExternalProject_run,build,\ CC=$(CC) $(if $(debug),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \ - sh $(if $(filter MACOSX,$(OS)),ccc.osx, \ + sh -e $(if $(filter MACOSX,$(OS)),ccc.osx, \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),ccc.static, \ $(if $(filter AIXGCC,$(OS)$(COM)),ccc.aix.gcc, \ ccc))) \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: external/lpsolve
external/lpsolve/ExternalProject_lpsolve.mk |1 + 1 file changed, 1 insertion(+) New commits: commit 6640136bd10a5704a85ec496cdbcd095656cf4a0 Author: Stephan Bergmann sberg...@redhat.com Date: Wed Jun 18 13:25:30 2014 +0200 Pass debug flags into lpsolve Change-Id: I8bfd8995fe59568d194948a6cf239a2477d0e0ea diff --git a/external/lpsolve/ExternalProject_lpsolve.mk b/external/lpsolve/ExternalProject_lpsolve.mk index 9576298..e0a9e46 100644 --- a/external/lpsolve/ExternalProject_lpsolve.mk +++ b/external/lpsolve/ExternalProject_lpsolve.mk @@ -32,6 +32,7 @@ endif # $(COM) else # $(OS)!=WNT $(call gb_ExternalProject_get_state_target,lpsolve,build): $(call gb_ExternalProject_run,build,\ + CC=$(CC) $(if $(debug),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \ sh $(if $(filter MACOSX,$(OS)),ccc.osx, \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),ccc.static, \ $(if $(filter AIXGCC,$(OS)$(COM)),ccc.aix.gcc, \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: external/lpsolve
external/lpsolve/UnpackedTarball_lpsolve.mk |1 + external/lpsolve/lpsolve-ubsan.patch.0 | 11 +++ 2 files changed, 12 insertions(+) New commits: commit e7e39d396913b002bdf9f76643f59108d849f392 Author: Stephan Bergmann sberg...@redhat.com Date: Wed Jun 18 13:26:50 2014 +0200 Avoid undefined out-of-range conversions from double to unsigned char Change-Id: I7cf4af81d477865aa0a93c8aa071a8785677c572 diff --git a/external/lpsolve/UnpackedTarball_lpsolve.mk b/external/lpsolve/UnpackedTarball_lpsolve.mk index 464fcab..3d17c0e 100644 --- a/external/lpsolve/UnpackedTarball_lpsolve.mk +++ b/external/lpsolve/UnpackedTarball_lpsolve.mk @@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,lpsolve,\ external/lpsolve/lp_solve-aix.patch \ external/lpsolve/lp_solve-fixed-warn.patch \ external/lpsolve/lp_solve_5.5.patch \ + external/lpsolve/lpsolve-ubsan.patch.0 \ )) $(eval $(call gb_UnpackedTarball_add_file,lpsolve,lpsolve55/ccc.static,external/lpsolve/ccc.static)) diff --git a/external/lpsolve/lpsolve-ubsan.patch.0 b/external/lpsolve/lpsolve-ubsan.patch.0 new file mode 100644 index 000..29e9ad3 --- /dev/null +++ b/external/lpsolve/lpsolve-ubsan.patch.0 @@ -0,0 +1,11 @@ +--- lp_pricePSE.c lp_pricePSE.c +@@ -145,7 +147,7 @@ + + /* Store the active/current pricing type */ + if(isdual == AUTOMATIC) +-isdual = (MYBOOL) lp-edgeVector[0]; ++isdual = lp-edgeVector[0] != 0.0; + else + lp-edgeVector[0] = isdual; + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: [Libreoffice-commits] core.git: external/lpsolve
On 06/18/2014 01:27 PM, Stephan Bergmann wrote: commit e7e39d396913b002bdf9f76643f59108d849f392 Author: Stephan Bergmann sberg...@redhat.com Date: Wed Jun 18 13:26:50 2014 +0200 Avoid undefined out-of-range conversions from double to unsigned char Change-Id: I7cf4af81d477865aa0a93c8aa071a8785677c572 diff --git a/external/lpsolve/UnpackedTarball_lpsolve.mk b/external/lpsolve/UnpackedTarball_lpsolve.mk index 464fcab..3d17c0e 100644 --- a/external/lpsolve/UnpackedTarball_lpsolve.mk +++ b/external/lpsolve/UnpackedTarball_lpsolve.mk @@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,lpsolve,\ external/lpsolve/lp_solve-aix.patch \ external/lpsolve/lp_solve-fixed-warn.patch \ external/lpsolve/lp_solve_5.5.patch \ + external/lpsolve/lpsolve-ubsan.patch.0 \ )) $(eval $(call gb_UnpackedTarball_add_file,lpsolve,lpsolve55/ccc.static,external/lpsolve/ccc.static)) diff --git a/external/lpsolve/lpsolve-ubsan.patch.0 b/external/lpsolve/lpsolve-ubsan.patch.0 new file mode 100644 index 000..29e9ad3 --- /dev/null +++ b/external/lpsolve/lpsolve-ubsan.patch.0 @@ -0,0 +1,11 @@ +--- lp_pricePSE.c lp_pricePSE.c +@@ -145,7 +147,7 @@ + + /* Store the active/current pricing type */ + if(isdual == AUTOMATIC) +-isdual = (MYBOOL) lp-edgeVector[0]; ++isdual = lp-edgeVector[0] != 0.0; As there appears to be no working upstream for lpsolve (at least I didn't find anything to report or discuss bugs at https://sourceforge.net/projects/lpsolve/), lets keep it LO: The above makes me wonder whether the replacement's effect is really what had been intended to be the original's effect. isdual is of type MYBOOL aka unsigned char, and lp-edgeVector[0] is of type REAL aka double. I mean, assuming 8-bit unsigned char, any lp-edgeVector[0] value not in the open interval (-1, 256) would have resulted in undefined behavior anyway, but even inside that interval, any values in the open intervals (-1, 0) and (0, 1) would have resulted in a MYBOOL value of FALSE (aka 0), and values in the half-open interval [2, 256) would have resulted in MYBOOL values different from TRUE (aka 1), where at least AUTOMATIC (aka 2) and DYNAMIC (aka 4) appear to be relevant. Maybe somebody who cares about LO's use of lpsolve has an idea. Stephan + else + lp-edgeVector[0] = isdual; + ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: external/lpsolve external/Module_external.mk lpsolve/ccc.static lpsolve/ExternalPackage_lpsolve.mk lpsolve/ExternalProject_lpsolve.mk lpsolve/lp_solve_5.5.patch lpsolve
RepositoryModule_host.mk|1 external/Module_external.mk |1 external/lpsolve/ExternalPackage_lpsolve.mk | 36 + external/lpsolve/ExternalProject_lpsolve.mk | 41 +++ external/lpsolve/Makefile |7 + external/lpsolve/Module_lpsolve.mk | 18 external/lpsolve/README |1 external/lpsolve/UnpackedTarball_lpsolve.mk | 36 + external/lpsolve/ccc.static | 11 +++ external/lpsolve/lp_solve-aix.patch | 39 ++ external/lpsolve/lp_solve-fixed-warn.patch | 84 +++ external/lpsolve/lp_solve_5.5-windows.patch | 60 external/lpsolve/lp_solve_5.5.patch | 101 lpsolve/ExternalPackage_lpsolve.mk | 36 - lpsolve/ExternalProject_lpsolve.mk | 41 --- lpsolve/Makefile|7 - lpsolve/Module_lpsolve.mk | 22 -- lpsolve/README |1 lpsolve/UnpackedTarball_lpsolve.mk | 36 - lpsolve/ccc.static | 11 --- lpsolve/lp_solve-aix.patch | 39 -- lpsolve/lp_solve-fixed-warn.patch | 84 --- lpsolve/lp_solve_5.5-windows.patch | 60 lpsolve/lp_solve_5.5.patch | 101 24 files changed, 435 insertions(+), 439 deletions(-) New commits: commit 79832d9259d609e8189ecfb48cd2856e83bb8d75 Author: Khaled Hosny khaledho...@eglug.org Date: Fri Oct 18 22:30:25 2013 +0200 fdo#70393: move lpsolve to a subdir of external Change-Id: I6c4a3bbd2cb514b979165bb041524706f3c28b0a Reviewed-on: https://gerrit.libreoffice.org/6341 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index 2d3be85..bf900b1 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -75,7 +75,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ lingucomponent \ linguistic \ lotuswordpro \ - $(call gb_Helper_optional,LPSOLVE,lpsolve) \ $(call gb_Helper_optional,DESKTOP,l10ntools) \ $(call gb_Helper_optional,MARIADB,libmariadb) \ $(call gb_Helper_optional,MDDS,mdds) \ diff --git a/external/Module_external.mk b/external/Module_external.mk index ec88b2d..9d24b23 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -48,6 +48,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,LIBPNG,libpng) \ $(call gb_Helper_optional,LIBXML2,libxml2) \ $(call gb_Helper_optional,LIBXSLT,libxslt) \ + $(call gb_Helper_optional,LPSOLVE,lpsolve) \ $(call gb_Helper_optional,MSPUB,libmspub) \ $(call gb_Helper_optional,MWAW,libmwaw) \ $(call gb_Helper_optional,ODFGEN,libodfgen) \ diff --git a/lpsolve/ExternalPackage_lpsolve.mk b/external/lpsolve/ExternalPackage_lpsolve.mk similarity index 100% rename from lpsolve/ExternalPackage_lpsolve.mk rename to external/lpsolve/ExternalPackage_lpsolve.mk diff --git a/lpsolve/ExternalProject_lpsolve.mk b/external/lpsolve/ExternalProject_lpsolve.mk similarity index 100% rename from lpsolve/ExternalProject_lpsolve.mk rename to external/lpsolve/ExternalProject_lpsolve.mk diff --git a/lpsolve/Makefile b/external/lpsolve/Makefile similarity index 71% rename from lpsolve/Makefile rename to external/lpsolve/Makefile index ccb1c85..e4968cf 100644 --- a/lpsolve/Makefile +++ b/external/lpsolve/Makefile @@ -2,6 +2,6 @@ module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST -include $(module_directory)/../solenv/gbuild/partial_build.mk +include $(module_directory)/../../solenv/gbuild/partial_build.mk # vim: set noet sw=4 ts=4: diff --git a/lpsolve/Module_lpsolve.mk b/external/lpsolve/Module_lpsolve.mk similarity index 88% rename from lpsolve/Module_lpsolve.mk rename to external/lpsolve/Module_lpsolve.mk index 10d0bba..e0094f6 100644 --- a/lpsolve/Module_lpsolve.mk +++ b/external/lpsolve/Module_lpsolve.mk @@ -9,14 +9,10 @@ $(eval $(call gb_Module_Module,lpsolve)) -ifeq ($(ENABLE_LPSOLVE),TRUE) -ifeq ($(SYSTEM_LPSOLVE),NO) $(eval $(call gb_Module_add_targets,lpsolve,\ UnpackedTarball_lpsolve \ ExternalPackage_lpsolve \ ExternalProject_lpsolve \ )) -endif -endif # vim: set noet sw=4 ts=4: diff --git a/lpsolve/README b/external/lpsolve/README similarity index 100% rename from lpsolve/README rename to external/lpsolve/README diff --git a/lpsolve/UnpackedTarball_lpsolve.mk b/external/lpsolve/UnpackedTarball_lpsolve.mk similarity index 80% rename from lpsolve/UnpackedTarball_lpsolve.mk rename to external/lpsolve/UnpackedTarball_lpsolve.mk index f9074a2..464fcab 100644 ---