Skip to content

Conversation

bjosv
Copy link

@bjosv bjosv commented Aug 7, 2025

Fixes runtime error warnings found when running the tests with the undefined behavior sanitizer enabled.

grep "runtime error" aws-c-auth/build/Testing/Temporary/LastTest.log

aws-c-common/source/hash_table.c:68:16: runtime error: call to function aws_byte_cursor_eq through pointer to incorrect function type 'bool (*)(const void *, const void *)'
...

Description of changes:
Add a callback function that uses correct signature aws_hash_callback_eq_fn (as seen in aws-c-mqtt).

Since the CI-build is not using -fno-sanitize-recover=all, and the warnings are recoverable they will not fail the CI build.
The warnings are also found when a user incorporates aws-sdk-cpp into a project and build it using an UB sanitizer.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixes runtime error warnings found when running the tests
with the undefined behavior sanitizer enabled.

"runtime error: call to function aws_byte_cursor_eq through pointer
 to incorrect function type 'bool (*)(const void *, const void *)'"

Signed-off-by: Björn Svensson <[email protected]>
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.

1 participant