Changeset: 9a438bba1820 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9a438bba1820
Modified Files:
        gdk/gdk_bbp.c
        gdk/gdk_tm.c
Branch: Jul2021
Log Message:

Add some asserts.


diffs (23 lines):

diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -3713,6 +3713,8 @@ BBPsync(int cnt, bat *restrict subcommit
                                        BBP_status_on(i, BBPSAVING);
                                        if (lock)
                                                MT_lock_unset(&GDKswapLock(i));
+                                       assert(sizes == NULL || size <= 
bi.count);
+                                       assert(sizes == NULL || bi.width == 0 
|| (bi.type == TYPE_msk ? ((size + 31) / 32) * 4 : size << bi.shift) <= 
bi.hfree);
                                        if (size > bi.count)
                                                size = bi.count;
                                        MT_rwlock_rdlock(&b->thashlock);
diff --git a/gdk/gdk_tm.c b/gdk/gdk_tm.c
--- a/gdk/gdk_tm.c
+++ b/gdk/gdk_tm.c
@@ -66,6 +66,7 @@ prelude(int cnt, bat *restrict subcommit
                                MT_lock_set(&b->theaplock);
                                assert(!isVIEW(b));
                                assert(b->batRole == PERSISTENT);
+                               assert(sizes == NULL || sizes[i] <= 
BATcount(b));
                                BATcommit(b, sizes ? sizes[i] : BUN_NONE);
                                MT_lock_unset(&b->theaplock);
                        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to