diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-08 20:29:11 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-08 20:30:02 +0000 |
commit | 8e310853e6e93153062451b97a0750ccb1c3b419 (patch) | |
tree | f696810cfd53ea02d71fa849da268679f54cb7b7 /dev-libs/isl | |
parent | net-misc/dropbox: drop old (diff) | |
download | gentoo-8e310853e6e93153062451b97a0750ccb1c3b419.tar.gz gentoo-8e310853e6e93153062451b97a0750ccb1c3b419.tar.bz2 gentoo-8e310853e6e93153062451b97a0750ccb1c3b419.zip |
dev-libs/isl: fix SIGSEGV for gcc, bug #702968
Picked proposed upstream patch from
https://groups.google.com/forum/#!original/isl-development/Otz1QKZDpzA/71GkTvqkCAAJ
Reported-by: wolfwood
Closes: https://bugs.gentoo.org/702968
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/isl')
-rw-r--r-- | dev-libs/isl/files/isl-0.22-bmap-nullderef.patch | 34 | ||||
-rw-r--r-- | dev-libs/isl/isl-0.22-r1.ebuild | 52 |
2 files changed, 86 insertions, 0 deletions
diff --git a/dev-libs/isl/files/isl-0.22-bmap-nullderef.patch b/dev-libs/isl/files/isl-0.22-bmap-nullderef.patch new file mode 100644 index 000000000000..00104f1f4321 --- /dev/null +++ b/dev-libs/isl/files/isl-0.22-bmap-nullderef.patch @@ -0,0 +1,34 @@ +https://groups.google.com/forum/#!original/isl-development/Otz1QKZDpzA/71GkTvqkCAAJ +https://bugs.gentoo.org/702968 + +Subject: [MAINT PATCH] isl_basic_map_underlying_set: fix error handling +Date: Tue, 7 Jan 2020 23:02:42 +0100 +Message-Id: <20200107220242...@kotnet.org> +X-Mailer: git-send-email 2.24.1.591.g12029dc57d +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +From: Sven Verdoolaege <sven.ve...@gmail.com> + +The check for a valid bmap before accessing its n_div field +was inadvertently removed in isl-0.21-230-g6a4c4bbf31 (isl_map.c: +extract out shared isl_basic_map_{take,restore}_space, +Thu Aug 11 10:27:49 2016 +0200). + +Reported-by: Richard Biener <rgue...@suse.de> +Signed-off-by: Sven Verdoolaege <sven.ve...@gmail.com> +--- + isl_map.c | 2 ++ + 1 file changed, 2 insertions(+) +--- a/isl_map.c ++++ b/isl_map.c +@@ -5511,6 +5511,8 @@ __isl_give isl_basic_set *isl_basic_map_underlying_set( + !isl_space_is_named_or_nested(bmap->dim, isl_dim_out)) + return bset_from_bmap(bmap); + bmap = isl_basic_map_cow(bmap); ++ if (!bmap) ++ return NULL; + space = isl_basic_map_take_space(bmap); + space = isl_space_underlying(space, bmap->n_div); + bmap = isl_basic_map_restore_space(bmap, space); +-- +2.24.1.591.g12029dc57d diff --git a/dev-libs/isl/isl-0.22-r1.ebuild b/dev-libs/isl/isl-0.22-r1.ebuild new file mode 100644 index 000000000000..807d8300e4a9 --- /dev/null +++ b/dev-libs/isl/isl-0.22-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit eutils multilib-minimal preserve-libs + +DESCRIPTION="A library for manipulating integer points bounded by linear constraints" +HOMEPAGE="http://isl.gforge.inria.fr/" +SRC_URI="http://isl.gforge.inria.fr/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0/22" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" +IUSE="static-libs" + +RDEPEND=">=dev-libs/gmp-5.1.3-r1[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + app-arch/xz-utils + virtual/pkgconfig" + +DOCS=( ChangeLog AUTHORS doc/manual.pdf ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.19-gdb-autoload-dir.patch + "${FILESDIR}"/${PN}-0.22-bmap-nullderef.patch +) + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf $(use_enable static-libs static) +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -type f -name '*.la' -delete +} + +pkg_preinst() { + preserve_old_lib \ + /usr/$(get_libdir)/libisl$(get_libname 14) \ + /usr/$(get_libdir)/libisl$(get_libname 15) \ + /usr/$(get_libdir)/libisl$(get_libname 19) \ + /usr/$(get_libdir)/libisl$(get_libname 21) +} + +pkg_postinst() { + preserve_old_lib_notify \ + /usr/$(get_libdir)/libisl$(get_libname 14) \ + /usr/$(get_libdir)/libisl$(get_libname 15) \ + /usr/$(get_libdir)/libisl$(get_libname 19) \ + /usr/$(get_libdir)/libisl$(get_libname 21) +} |