Changeset: c2a2d2087e88 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c2a2d2087e88
Modified Files:
        gdk/gdk.h
        gdk/gdk_calc.c
Branch: ustr
Log Message:

Two fixes for bugs found by address sanitizer.


diffs (25 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -666,7 +666,8 @@ bat_iterator_nolock(BAT *b)
                        .vkey = (b->tvheap &&
                                 (b->tvkey ||
                                  BBP_desc(b->tvheap->parentid)->tvkey ||
-                                 (ATOMstorage(b->ttype) == TYPE_str &&
+                                 (b->ttype > 0 &&
+                                  ATOMstorage(b->ttype) == TYPE_str &&
                                   GDK_ELIMDOUBLES(b->tvheap)))),
                        .nonil = b->tnonil,
                        .nil = b->tnil,
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -4496,7 +4496,7 @@ BATcalcifthenelse_intern(BATiter *bi,
        if (bn->tvheap) {
                assert((heap1 != NULL && width1 > 0) || (width1 == 0 && incr1 
== 0));
                assert((heap2 != NULL && width2 > 0) || (width2 == 0 && incr2 
== 0));
-               const void *nil = ATOMnilptr(bi->type);
+               const void *nil = ATOMnilptr(tpe);
                if (ATOMstorage(bi->type) == TYPE_msk) {
                        const uint32_t *src = bi->base;
                        BUN n = cnt / 32;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to