From ec225d2e97435468b718a92d2ed84040ea872401 Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Tue, 30 Jan 2018 16:19:22 -0800 Subject: [PATCH] Make WithParamInterface virtual in transaction_test Summary: Without this patch, ubsan_check is currently failing with this error: ``` utilities/transactions/write_prepared_transaction_test.cc:369:63: runtime error: member call on address 0x0000051649f8 which does not point to an object of type 'WithParamInterface' 0x0000051649f8: note: object has invalid vptr ``` Tested by `COMPILE_WITH_UBSAN=1 make -j32 transaction_test` and running `./write_prepared_transaction_test --gtest_filter=TwoWriteQueues/SnapshotConcurrentAccessTest.SnapshotConcurrentAccessTest1/0` Closes https://github.com/facebook/rocksdb/pull/3444 Differential Revision: D6850087 Pulled By: maysamyabandeh fbshipit-source-id: 5b254da8504b8757f7aec8a820ad464154da1a1d --- utilities/transactions/transaction_test.h | 2 +- utilities/transactions/write_prepared_transaction_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/transactions/transaction_test.h b/utilities/transactions/transaction_test.h index 522f95dfd..a7398551f 100644 --- a/utilities/transactions/transaction_test.h +++ b/utilities/transactions/transaction_test.h @@ -400,7 +400,7 @@ class TransactionTestBase : public ::testing::Test { }; class TransactionTest : public TransactionTestBase, - public ::testing::WithParamInterface< + virtual public ::testing::WithParamInterface< std::tuple> { public: TransactionTest() diff --git a/utilities/transactions/write_prepared_transaction_test.cc b/utilities/transactions/write_prepared_transaction_test.cc index 5e8a88059..44d8ddbdf 100644 --- a/utilities/transactions/write_prepared_transaction_test.cc +++ b/utilities/transactions/write_prepared_transaction_test.cc @@ -360,7 +360,7 @@ class WritePreparedTransactionTest class SnapshotConcurrentAccessTest : public WritePreparedTransactionTestBase, - public ::testing::WithParamInterface< + virtual public ::testing::WithParamInterface< std::tuple> { public: SnapshotConcurrentAccessTest()