From 5dfeb26113fb6828f2973fa3cfd0816dbd7838a8 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 12 Nov 2012 12:13:15 +0100 Subject: [PATCH] isl_aff_gist: add missing isl_vec_cow We could end up modifying a different isl_aff that originated from the same isl_aff as the one being modified. Signed-off-by: Sven Verdoolaege --- isl_aff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_aff.c b/isl_aff.c index 372afb6..79fd8d5 100644 --- a/isl_aff.c +++ b/isl_aff.c @@ -1276,7 +1276,8 @@ static __isl_give isl_aff *isl_aff_substitute_equalities_lifted( aff->ls = isl_local_space_substitute_equalities(aff->ls, isl_basic_set_copy(eq)); - if (!aff->ls) + aff->v = isl_vec_cow(aff->v); + if (!aff->ls || !aff->v) goto error; total = 1 + isl_space_dim(eq->dim, isl_dim_all); -- 2.7.4