summaryrefslogtreecommitdiff
path: root/dev-libs/isl/files/isl-0.22-bmap-nullderef.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/isl/files/isl-0.22-bmap-nullderef.patch')
-rw-r--r--dev-libs/isl/files/isl-0.22-bmap-nullderef.patch34
1 files changed, 34 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