cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 623 forks source link

Destruction of uninitialized Value in FillPredicateArray #1363

Open Zeninma opened 6 years ago

Zeninma commented 6 years ago

Inside peloton/src/codegen/runtime_functions.cpp, void RuntimeFunctions::FillPredicateArray assigns (*parsed_predicates)[i].predicate_value to predicate_array[i].predicate_value. However, predicate_array[i].predicate_value has never been initialized. In Table::GenerateScan, it only gets allocated a block of memory. Hence, during the assignment an uninitialized Value will be destructred and cause a valgrind error Conditional jump or move depends on uninitialised value(s) at the destructor's switch statement . We solved this problem in our PR(#1339) by avoid using predicate_array and calling RuntimeFunctions:: FillPredicateArray.