From 2e92e2c7f1316ec8106268275aa84096d7986612 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 16 May 2017 09:30:16 +0200 Subject: [PATCH] isl_union_map.c: gen_bin_entry: improve error handling In particular, handle errors in space manipulations. Without the explicit test, a NULL space would simply be treated as a missing space. Signed-off-by: Sven Verdoolaege --- isl_union_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_union_map.c b/isl_union_map.c index 3482bc04..666daff4 100644 --- a/isl_union_map.c +++ b/isl_union_map.c @@ -695,6 +695,8 @@ static isl_stat gen_bin_entry(void **entry, void *user) space = isl_map_get_space(map); if (data->control->match_space != &identity) space = data->control->match_space(space); + if (!space) + return isl_stat_error; hash = isl_space_get_hash(space); entry2 = isl_hash_table_find(isl_union_map_get_ctx(data->umap2), &data->umap2->table, hash, -- 2.11.4.GIT