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

multi: avoid reading whole struct pointer from pointer #15063

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Sep 26, 2024

The proper alignment is not guaranteed. This now uses only the first and last byte in the key since they are the ones likely to change most (one of them, depending on CPU endian) and the hash is tiny anyway.

The proper alignment is not guaranteed. This now uses only the first and
last byte in the key since they are the ones likely to change most (one
of them, depending on CPU endian) and the hash is tiny anyway.
@bagder bagder added the tidy-up label Sep 26, 2024
@bagder bagder changed the title multi: avoid reading whole struct from pointer multi: avoid reading whole struct pointer from pointer Sep 26, 2024
@dfandrich
Copy link
Contributor

Analysis of PR #15063 at 7afd6417:

Test 2405 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 1035 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Generated by Testclutch

@bagder bagder closed this in d08d16c Sep 26, 2024
@bagder bagder deleted the bagder/trhash branch September 26, 2024 21:38
@jay
Copy link
Member

jay commented Sep 26, 2024

if the keylen is greater than the size of a Curl_easy then wouldn't it be out of bounds?

@bagder
Copy link
Member Author

bagder commented Sep 26, 2024

They keys are struct Curl_easy * in this hash, so the keylen will be the size of the pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants