Changeset: 1f3b95642ebe for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1f3b95642ebe Modified Files: monetdb5/mal/mal_interpreter.c Branch: Sep2022 Log Message:
Fix some data races. If a bat doesn't have a logical reference during garbage collect, there is something wrong, so in a debug build we want an assert going off, and in a production build we want an error message. Avoid calling findVariable during MAL execution. It's too late to be writing variable names into variables that are being used concurrently. diffs (21 lines): diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c --- a/monetdb5/mal/mal_interpreter.c +++ b/monetdb5/mal/mal_interpreter.c @@ -964,7 +964,7 @@ runMALsequence(Client cntxt, MalBlkPtr m exceptionVar = findVariableLength(mb, ret, (int)(msg - ret)); } if (exceptionVar == -1) - exceptionVar = findVariable(mb, "ANYexception"); + exceptionVar = findVariableLength(mb, "ANYexception", 12); /* unknown exceptions lead to propagation */ if (exceptionVar == -1) { @@ -1440,8 +1440,6 @@ garbageElement(Client cntxt, ValPtr v) v->val.bval = bat_nil; if (is_bat_nil(bid)) return; - if (!BBP_lrefs(bid)) - return; BBPcold(bid); BBPrelease(bid); } else if (0 < v->vtype && v->vtype < MAXATOMS && ATOMextern(v->vtype)) { _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org