-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-3979 : [Gandiva] fix all valgrind reported errors #3201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,7 @@ function(add_precompiled_unit_test REL_TEST_NAME) | |
| ) | ||
| target_compile_definitions(${TEST_NAME} PRIVATE GANDIVA_UNIT_TEST=1) | ||
| add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME}) | ||
| set_property(TEST ${TEST_NAME} PROPERTY LABELS gandiva;unittest ${TEST_NAME}) | ||
| set_property(TEST ${TEST_NAME} PROPERTY LABELS gandiva-tests {TEST_NAME}) | ||
|
||
| endfunction(add_precompiled_unit_test REL_TEST_NAME) | ||
|
|
||
| # testing | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -175,6 +175,12 @@ Status Projector::AllocArrayData(const DataTypePtr& type, int64_t num_records, | |
| astatus = arrow::AllocateBuffer(pool, data_len, &data); | ||
| ARROW_RETURN_NOT_OK(astatus); | ||
|
|
||
| // Valgrind detects unitialized memory at byte level. Boolean types use bits | ||
| // and can leave buffer memory uninitialized in the last byte. | ||
| if (type->id() == arrow::Type::BOOL) { | ||
| data->mutable_data()[data_len - 1] = 0; | ||
| } | ||
|
||
|
|
||
| *array_data = arrow::ArrayData::Make(type, num_records, {null_bitmap, data}); | ||
| return Status::OK(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
--only-libraryprobably makes building slower. Is it necessary?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will go away with ARROW-3803
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this option, gandiva tests were not running as part of CI. I guess in the travis gandiva script, gandiva tests option is enabled only if "--only-library" was not enabled. But, if the 3803 takes care of it, I am fine removing it.