Add build flag to enable the Undefined Behavior Sanitizer#3645
Add build flag to enable the Undefined Behavior Sanitizer#3645
Conversation
The flag can be enabled in CMake using -DENABLE_UB_SANITIZER=ON Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
|
So i have two high level thoughts on this I know when running cmake generation instead of relying on a option we define ourselves. infact in our CI step we actually use address sanatizer that way instead of providing the cmake option directly.
I whole heartily agree on this sentiment, but until your PRs are merged and the other issue dealt with the build will actually fail so i would be against adding a flag until its passing. so summarizing:
|
Sounds reasonable. The problem I faced was how to get the same flags in crt dependencies when building with the default |
The flag can be enabled in CMake using
-DENABLE_UB_SANITIZER=ONsimilar to the existing flag for the address sanitizer.Building aws-sdk-cpp (and its dependencies) with this flag indicates a couple of issues, like:
Existing PRs to fix above issues are: awslabs/aws-c-http#531 and awslabs/aws-c-sdkutils#58
Related issue for one issue: #3464
Some of these issues are also seen when a SDK-user builds with UBSan.
Maybe we should add a CI-step building with this flag?
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.