Assert released transaction is != last in pool:

a cheap way to notice what went wrong in https://github.com/root-project/root/issues/7657.
This commit is contained in:
Axel Naumann 2021-03-31 15:10:21 +02:00 committed by jenkins
parent 2555c8f542
commit 4edb1ed0f2

View File

@ -58,6 +58,8 @@ namespace cling {
// Transaction T must be from call to TransactionPool::takeTransaction
//
void releaseTransaction(Transaction* T, bool reuse = true) {
assert((m_Transactions.empty() || m_Transactions.back() != T) \
&& "Transaction already in pool");
if (reuse) {
assert((T->getState() == Transaction::kCompleted ||
T->getState() == Transaction::kRolledBack)