You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/isl/files/isl-0.22-bmap-nullderef.patch

35 lines
1.2 KiB

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