From: Sven Verdoolaege Date: Mon, 12 Nov 2012 11:13:15 +0000 (+0100) Subject: isl_aff_gist: add missing isl_vec_cow X-Git-Tag: isl-0.11~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5dfeb26113fb6828f2973fa3cfd0816dbd7838a8;p=platform%2Fupstream%2Fisl.git 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 --- 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);