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

[C++] A wrong total_bytes to generate StringType's test data in vector_hash_benchmark #40306

Closed
ZhangHuiGui opened this issue Mar 1, 2024 · 1 comment
Assignees
Milestone

Comments

@ZhangHuiGui
Copy link
Collaborator

Describe the bug, including details regarding any error messages, version, and platform.

A wrong total_bytes to generate StringType's test data in vector_hash_benchmark.

const int64_t total_bytes = this->byte_width * params.num_unique;

It may cause the implicit buffer-overflow and inaccurate benchmark.

Component(s)

C++

bkietz pushed a commit that referenced this issue Mar 14, 2024
… data in vector_hash_benchmark (#40307)

### Rationale for this change
Fix a wrong total_bytes to generate StringType's test data in vector_hash_benchmark

### What changes are included in this PR?
Use  `params.length*byte_width` as the length of `std::vector<uint8_t> uniques` array.

### Are these changes tested?

### Are there any user-facing changes?
No

* GitHub Issue: #40306

Authored-by: hugo.zhang <hugo.zhang@openpie.com>
Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
@bkietz bkietz added this to the 16.0.0 milestone Mar 14, 2024
@bkietz
Copy link
Member

bkietz commented Mar 14, 2024

Issue resolved by pull request 40307
#40307

@bkietz bkietz closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants