Changeset: 0dc61a67178a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0dc61a67178a Modified Files: gdk/gdk_aggr.c Branch: default Log Message:
Fix scope of BAT iterator. The pointer res can point into the iterator, so the iterator must be in scope when we dereference res. diffs (35 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -2621,6 +2621,7 @@ BATmin(BAT *b, void *aggr) PROPrec *prop; const void *res; size_t s; + BATiter bi; if (!ATOMlinear(b->ttype)) { GDKerror("BATmin: non-linear type"); @@ -2632,7 +2633,6 @@ BATmin(BAT *b, void *aggr) res = VALptr(&prop->v); } else { oid pos; - BATiter bi; BAT *pb = NULL; if (BATcheckorderidx(b) || @@ -2715,6 +2715,7 @@ BATmax(BAT *b, void *aggr) PROPrec *prop; const void *res; size_t s; + BATiter bi; if (!ATOMlinear(b->ttype)) { GDKerror("BATmax: non-linear type"); @@ -2726,7 +2727,6 @@ BATmax(BAT *b, void *aggr) res = VALptr(&prop->v); } else { oid pos; - BATiter bi; BAT *pb = NULL; if (BATcheckorderidx(b) || _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list