Skip to content

Commit

Permalink
Fix valgrind error: Conditional jump or move depends on uninitialised…
Browse files Browse the repository at this point in the history
… value(s) (#7518)

Signed-off-by: Misiu Godfrey <misiu.godfrey@kraken.mapd.com>
  • Loading branch information
mattpulver authored and misiugodfrey committed Sep 28, 2023
1 parent 9fb881a commit 492c0fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion QueryEngine/Execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ class Executor {
static uint32_t gpu_active_modules_device_mask_;
static void* gpu_active_modules_[max_gpu_count];
// indicates whether this executor has been interrupted
std::atomic<bool> interrupted_;
std::atomic<bool> interrupted_{false};

mutable std::mutex str_dict_mutex_;

Expand Down
12 changes: 12 additions & 0 deletions Tests/ExecuteTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26012,6 +26012,18 @@ TEST_F(Select, InfNanTest) {
}
}

// Use a non-empty session_id to test call to Executor::removeFromQuerySessionList().
// This test verifies QE-952 fixes a valgrind error.
TEST_F(Select, RemoveFromQuerySessionList) {
SKIP_ALL_ON_AGGREGATOR();
for (auto dt : {ExecutorDeviceType::CPU, ExecutorDeviceType::GPU}) {
SKIP_NO_GPU();
char const* query = "SELECT COUNT(*) FROM test;";
char const* session_id = "0123456789ABCDEF0123456789ABCDEF"; // len=32
QR::get()->runSQLWithAllowingInterrupt(query, session_id, dt);
}
}

class DateAndTimeFunctionsTest : public QRExecutorDeviceParamTest {};

TEST_P(DateAndTimeFunctionsTest, CastLiteralToDate) {
Expand Down

0 comments on commit 492c0fe

Please sign in to comment.