projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4f18f8b
)
isl_aff_scale_down: check for scaling down by zero
author
Sven Verdoolaege
<skimo@kotnet.org>
Fri, 10 Aug 2012 14:54:00 +0000
(16:54 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Mon, 13 Aug 2012 16:38:16 +0000
(18:38 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_aff.c
patch
|
blob
|
history
diff --git
a/isl_aff.c
b/isl_aff.c
index
b7d510f
..
1b5d4f5
100644
(file)
--- a/
isl_aff.c
+++ b/
isl_aff.c
@@
-902,6
+902,11
@@
__isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f)
aff = isl_aff_cow(aff);
if (!aff)
return NULL;
+
+ if (isl_int_is_zero(f))
+ isl_die(isl_aff_get_ctx(aff), isl_error_invalid,
+ "cannot scale down by zero", return isl_aff_free(aff));
+
aff->v = isl_vec_cow(aff->v);
if (!aff->v)
return isl_aff_free(aff);