From 2c18c458681650fad24cbcdcad9f32027a6956b0 Mon Sep 17 00:00:00 2001 From: Ypatia Tsavliri Date: Fri, 29 Mar 2024 13:34:33 +0000 Subject: [PATCH] Fix use after free in tests and others --- test/src/test-capi-consolidation-plan.cc | 1 - test/src/unit-capi-serialized_queries_using_subarray.cc | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/src/test-capi-consolidation-plan.cc b/test/src/test-capi-consolidation-plan.cc index 82058c72402..f222a839330 100644 --- a/test/src/test-capi-consolidation-plan.cc +++ b/test/src/test-capi-consolidation-plan.cc @@ -93,7 +93,6 @@ ConsolidationPlanFx::ConsolidationPlanFx() ConsolidationPlanFx::~ConsolidationPlanFx() { test::vfs_test_remove_temp_dir(ctx_c_, vfs_c_, fs_vec_[0]->temp_dir()); test::vfs_test_close(fs_vec_, ctx_c_, vfs_c_).ok(); - tiledb_ctx_free(&ctx_c_); tiledb_vfs_free(&vfs_c_); } diff --git a/test/src/unit-capi-serialized_queries_using_subarray.cc b/test/src/unit-capi-serialized_queries_using_subarray.cc index eb82c91a029..cda10080732 100644 --- a/test/src/unit-capi-serialized_queries_using_subarray.cc +++ b/test/src/unit-capi-serialized_queries_using_subarray.cc @@ -324,7 +324,12 @@ struct SerializationFx { TEST_CASE_METHOD( SerializationFx, "subarray - Query serialization, dense", - "[query][dense][serialization][rest-fails][sc-40489]") { + "[query][dense][serialization][rest][sc-40489]") { + if (!vfs_test_setup_.is_rest()) { + SUCCEED("sc-40489: this test passes on remote arrays only"); + return; + } + create_array(TILEDB_DENSE); auto expected_results = write_dense_array(); check_subarray_stats(2, 2);