Skip to content

Fix djb2 case insensitive hash function#21787

Merged
KBaichoo merged 1 commit intoenvoyproxy:mainfrom
andre-rosa:fix-djb2-case-insensitive-hash-function
Jun 21, 2022
Merged

Fix djb2 case insensitive hash function#21787
KBaichoo merged 1 commit intoenvoyproxy:mainfrom
andre-rosa:fix-djb2-case-insensitive-hash-function

Conversation

@andre-rosa
Copy link
Copy Markdown
Contributor

Commit Message: Fix djb2 case insensitive hash function
Additional Description: See http://www.cse.yorku.ca/~oz/hash.html
Risk Level: N/A
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Commit Message: Fix djb2 case insensitive hash function
Additional Description: See http://www.cse.yorku.ca/~oz/hash.html
Risk Level: N/A
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only
Copy link
Copy Markdown

Hi @andre-rosa, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #21787 was opened by andre-rosa.

see: more, trace.

@andre-rosa andre-rosa force-pushed the fix-djb2-case-insensitive-hash-function branch from 851e94d to cd34861 Compare June 20, 2022 18:58
@dio
Copy link
Copy Markdown
Member

dio commented Jun 20, 2022

@andre-rosa cool. Nice catch. But seems like you need to update the expectations for some test cases?

[ RUN      ] StringUtil.StringViewCaseInsensitiveHash
test/common/common/utility_test.cc:454: Failure
Expected equality of these values:
  8972312556107145900U
    Which is: 8972312556107145900
  StringUtil::CaseInsensitiveHash()("hello world")
    Which is: 13876786532495509697
Stack trace:
  0x4ea0f1: Envoy::StringUtil_StringViewCaseInsensitiveHash_Test::TestBody()
  0x9f58fc: testing::internal::HandleExceptionsInMethodIfSupported<>()
  0x9f57bd: testing::Test::Run()
  0x9f6747: testing::TestInfo::Run()

@andre-rosa andre-rosa force-pushed the fix-djb2-case-insensitive-hash-function branch from cd34861 to e5cf6dd Compare June 20, 2022 23:44
Signed-off-by: Andre Goddard Rosa <andre.goddard@gmail.com>

Commit Message: Fix djb2 case insensitive hash function
Additional Description: See http://www.cse.yorku.ca/~oz/hash.html
Risk Level: N/A
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
@andre-rosa andre-rosa force-pushed the fix-djb2-case-insensitive-hash-function branch from e5cf6dd to b71e45c Compare June 21, 2022 00:41
Copy link
Copy Markdown
Contributor

@KBaichoo KBaichoo left a comment

Choose a reason for hiding this comment

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

lgtm, nice catch!

@KBaichoo KBaichoo merged commit 3cf06f8 into envoyproxy:main Jun 21, 2022
@andre-rosa andre-rosa deleted the fix-djb2-case-insensitive-hash-function branch June 21, 2022 21:13
Amila-Rukshan pushed a commit to Amila-Rukshan/envoy that referenced this pull request Jun 28, 2022
Signed-off-by: Andre Goddard Rosa <andre.goddard@gmail.com>

Commit Message: Fix djb2 case insensitive hash function
Additional Description: See http://www.cse.yorku.ca/~oz/hash.html
Risk Level: N/A
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Amila Senadheera <amila.15@cse.mrt.ac.lk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants