Hello community, here is the log from the commit of package CSXCAD for openSUSE:Factory checked in at 2020-07-06 16:30:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/CSXCAD (Old) and /work/SRC/openSUSE:Factory/.CSXCAD.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "CSXCAD" Mon Jul 6 16:30:30 2020 rev:10 rq:818876 version:0.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/CSXCAD/CSXCAD.changes 2019-04-04 12:08:53.345356107 +0200 +++ /work/SRC/openSUSE:Factory/.CSXCAD.new.3060/CSXCAD.changes 2020-07-06 16:32:44.299797318 +0200 @@ -1,0 +2,6 @@ +Sun Jun 7 21:55:05 UTC 2020 - Stefan BrĂ¼ns <stefan.bru...@rwth-aachen.de> + +- Fix build with VTK 9.0, which reflects constness more strictly: + 0001-Fix-build-with-VTK-9.0-fix-memory-leak.patch + +------------------------------------------------------------------- New: ---- 0001-Fix-build-with-VTK-9.0-fix-memory-leak.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ CSXCAD.spec ++++++ --- /var/tmp/diff_new_pack.Z6NfIv/_old 2020-07-06 16:32:45.811801963 +0200 +++ /var/tmp/diff_new_pack.Z6NfIv/_new 2020-07-06 16:32:45.811801963 +0200 @@ -1,7 +1,7 @@ # # spec file for package CSXCAD # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,7 @@ Summary: A C++ library to describe geometrical objects and their properties License: LGPL-3.0-or-later Group: Productivity/Scientific/Physics -Url: http://openems.de +URL: https://openems.de Source0: https://github.com/thliebig/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM CSXCAD-vtk.patch Patch1: CSXCAD-vtk.patch @@ -37,21 +37,19 @@ Patch4: CSXCAD-readme-octave-package.patch # PATCH-FIX-UPSTREAM CSXCAD-HDF5.patch Patch5: CSXCAD-hdf5.patch -%if 0%{?suse_version} >= 1500 +# PATCH-FIX-UPSTREAM -- https://github.com/thliebig/CSXCAD/pull/17 +Patch6: 0001-Fix-build-with-VTK-9.0-fix-memory-leak.patch +BuildRequires: cgal-devel +BuildRequires: cmake +BuildRequires: double-conversion-devel +BuildRequires: fparser-devel +BuildRequires: gcc-c++ BuildRequires: libboost_chrono-devel BuildRequires: libboost_date_time-devel BuildRequires: libboost_headers-devel BuildRequires: libboost_serialization-devel BuildRequires: libboost_system-devel BuildRequires: libboost_thread-devel -%else -BuildRequires: boost-devel -%endif -BuildRequires: cgal-devel -BuildRequires: cmake -BuildRequires: double-conversion-devel -BuildRequires: fparser-devel -BuildRequires: gcc-c++ BuildRequires: lzma-devel BuildRequires: octave-devel BuildRequires: python3-devel @@ -59,7 +57,6 @@ BuildRequires: vtk-devel BuildRequires: cmake(Qt5Sql) BuildRequires: cmake(Qt5Widgets) -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description CSXCAD is a C++ library to describe geometrical objects and their physical @@ -115,6 +112,7 @@ %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 echo "Name: %{octpkg}" >> DESCRIPTION echo "Version: %{version}" >> DESCRIPTION ++++++ 0001-Fix-build-with-VTK-9.0-fix-memory-leak.patch ++++++ >From 4fb68af94c89bb2eb44d810cbfc043524c024c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Sun, 7 Jun 2020 23:53:51 +0200 Subject: [PATCH] Fix build with VTK 9.0, fix memory leak The vertices array contains immutable IDs, which is reflected by the changed API in VTK 9.0. As GetNextCell(numP, vertices) overwrites vertices (it is a reference), the previously pointed to/acllocated array was leaked. --- src/CSPrimPolyhedronReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSPrimPolyhedronReader.cpp b/src/CSPrimPolyhedronReader.cpp index 4d44f49..e3d347e 100644 --- a/src/CSPrimPolyhedronReader.cpp +++ b/src/CSPrimPolyhedronReader.cpp @@ -163,7 +163,11 @@ bool CSPrimPolyhedronReader::ReadFile() AddVertex(polydata->GetPoint(n)); vtkIdType numP; - vtkIdType *vertices = new vtkIdType[10]; +#if VTK_MAJOR_VERSION >= 9 + vtkIdType const *vertices = nullptr; +#else + vtkIdType *vertices = nullptr; +#endif while (verts->GetNextCell(numP, vertices)) { face f; -- 2.26.2