From e4fc823bb435ae171338527461b302042ebc4d3e Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Wed, 29 Jun 2022 12:53:40 +0200 Subject: [PATCH] Add TODO for SegFault Factory in GetResultSet --- include/caosdb/transaction.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h index 535f747..e73840e 100644 --- a/include/caosdb/transaction.h +++ b/include/caosdb/transaction.h @@ -408,6 +408,10 @@ public: CAOSDB_LOG_ERROR(logger_name) << "GetResultSet was called before the transaction has terminated. This is a programming " "error of the code which uses the transaction."; + // TODO(tf) This is a really bad SegFault factory. When the transaction + // terminates and the result_set is being overriden, the unique_ptr + // created here will be deleted and any client of the return ResultSet + // will have a SegFault. } else if (this->GetStatus().GetCode() == StatusCode::SPOILED) { CAOSDB_LOG_ERROR(logger_name) << "GetResultSet was called on a \"spoiled\" transaction. That means " -- GitLab