Changeset: 495b28e56a09 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/495b28e56a09
Modified Files:
gdk/gdk_bat.c
Branch: Dec2023
Log Message:
Add locks around call to ATOMreplaceVAR since it may call HEAPgrow.
diffs (17 lines):
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -1702,10 +1702,13 @@ BUNinplacemulti(BAT *b, const oid *posit
default:
MT_UNREACHABLE();
}
+ MT_lock_set(&b->theaplock);
if (ATOMreplaceVAR(b, &_d, t) != GDK_SUCCEED) {
+ MT_lock_unset(&b->theaplock);
MT_rwlock_wrunlock(&b->thashlock);
goto bailout;
}
+ MT_lock_unset(&b->theaplock);
if (b->twidth < SIZEOF_VAR_T &&
(b->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >=
((size_t) 1 << (8 << b->tshift))) {
/* doesn't fit in current heap, upgrade it */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]