Skip to content

Conversation

@bjosv
Copy link
Contributor

@bjosv bjosv commented Aug 6, 2025

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

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

aws-c-common/source/ref_count.c:29:9: runtime error: call to function s_destroy_one_time_identity_strategy through pointer to incorrect function type 'void (*)(void *)'
...

Update callback functions to use correct signature, see aws_simple_completion_callback.

Since the CI-build is not using -fno-sanitize-recover=all the warnings are recoverable and 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 during build.

"runtime error: call to function ... through pointer to
 incorrect function type 'void (*)(void *)'"

Signed-off-by: Björn Svensson <[email protected]>
@TingDaoK TingDaoK merged commit 283399e into awslabs:main Aug 6, 2025
41 checks passed
@bjosv bjosv deleted the ubsan-fixes branch August 7, 2025 07:53
bjosv added a commit to Nordix/aws-c-http that referenced this pull request Oct 21, 2025
quinnj pushed a commit to quinnj/aws-c-http that referenced this pull request Oct 25, 2025
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.

2 participants