Skip to content
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

tidb_query_vec_executors: Fixed stack-borrowing undefined-behavior #7709

Merged
merged 3 commits into from
Apr 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ impl<Src: BatchExecutor> AggregationExecutorImpl<Src> for SlowHashAggregationImp
)?;
}

let buffer_ptr = (&*self.group_key_buffer).into();
for logical_row_idx in 0..logical_rows_len {
let offset_begin = self.group_key_buffer.len();

Expand Down Expand Up @@ -361,6 +360,7 @@ impl<Src: BatchExecutor> AggregationExecutorImpl<Src> for SlowHashAggregationImp
}
}

let buffer_ptr = (&*self.group_key_buffer).into();
// Extra column is not included in `GroupKeyRefUnsafe` to avoid being aggr on.
let group_key_ref_unsafe = GroupKeyRefUnsafe {
buffer_ptr,
Expand Down