mbedtls
mbedtls copied to clipboard
Fix problems found by clang+UBSan on Ubuntu 20.04
Fix some issues reported by UBSan with a recent Clang (but not by a recent GCC or an old Clang). They are genuine instances of undefined behavior, although in practice compilers and processors are very likely to do what we want. This includes an issue fixed in https://github.com/Mbed-TLS/mbedtls/pull/6609. Now tests will pass when building with Clang and UBSan on Ubuntu 20.04.
Run UBSan with a recent Clang on the CI. I replaced a GCC+UBSan component, so the CI load will remain the same. Fixes #6610.
Gatekeeper checklist
- [x] changelog no (test only)
- [ ] backport TODO
- [x] tests N/A (it's all test)
Hmm, CI failing with
Component test_full_cmake_clang_asan was explicitly requested, but is not known or not supported.
Regarding the preceding-pr
#6609, is this one instead of that older one, or does 6609 need reviewing in additon?
This PR has all the commits of #6609 (so far) plus more stuff. I'd prefer to get #6609 (and trivial backport) in first, then rebase this one (and backport which might be nontrivial depending on exactly how all.sh
evolves and what this means with SSL testing).
@daverodgman @tom-cosgrove-arm The UB fix part, plus a reduced Travis test, is up for review at https://github.com/Mbed-TLS/mbedtls/pull/6648
What's happening with this PR now?
@tom-cosgrove-arm
- Get the UB fix and minimum-effort Travis test in (https://github.com/Mbed-TLS/mbedtls/pull/6648 and I'm still working on the minimum-effort Travis test for 2.28, hope to get that passing today).
- Merge https://github.com/Mbed-TLS/mbedtls-test/pull/76
- Rebase this PR to be just the
all.sh
changes (which are passing! But not running until the Groovy code is fixed)
As part of our review of historical PRs we have made the decision to convert older PRs that have not been updated in 3 months into drafts until they are worked on again.