Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Jun 24, 2021

No description provided.

@pitrou pitrou requested a review from emkornfield June 24, 2021 16:51
@github-actions
Copy link

@pitrou pitrou force-pushed the ARROW-13104-unsafe-cast branch from fb5b5fb to ea793ac Compare June 24, 2021 17:11
template <>
void ByteStreamSplitEncoder<FloatType>::PutArrowArray(const ::arrow::Array& values) {
DirectPutImpl<::arrow::FloatArray>(values,
reinterpret_cast<::arrow::BufferBuilder*>(&values_));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the offending cast (and below as well).

@pitrou pitrou requested a review from bkietz June 29, 2021 16:02
Copy link
Contributor

@cyb70289 cyb70289 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1.

Tested that inserting a dummy data member (before below line) or a dummy virtual function to TypedBufferBuillder crashes current code.
https://github.com/apache/arrow/blob/master/cpp/src/arrow/buffer_builder.h#L302

@pitrou
Copy link
Member Author

pitrou commented Jun 30, 2021

Thanks for the review @cyb70289 ! I will merge now (AppVeyor failure is unrelated).

@pitrou pitrou closed this in 58b3109 Jun 30, 2021
@pitrou pitrou deleted the ARROW-13104-unsafe-cast branch June 30, 2021 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants