Some ASan failures go undetected in all.sh #303
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto#303
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
We use the following idiom in several components of
all.sh:If the tests pass functionally but ASan detects a memory leak,
make testsucceeds. We can see a message like “SUMMARY: AddressSanitizer: 544 byte(s) leaked in 83 allocation(s).” in the logs, but only if we go and look for it.The reason is that
run-test-suites.plconsiders a test suite as passing if it displays the stringPASSED. An Asan failure at the end of the program, such as a memory leak, is not counted as a failure.This affects both Mbed Crypto and Mbed TLS.
Builds using CMake (e.g.
cmake -D CMAKE_BUILD_TYPE=Asan) are not affected because they use CMake'sctestutility rather thanrun-test-suites.pl.The affected components are:
test_m32_o0,test_m32_o1andtest_m32_everestin both Mbed Crypto and Mbed TLS.test_malloc_0_null,test_se_defaultandtest_se_fullin Mbed Crypto.Current status: one memory leak has gone undetected in
mbed-crypto/development, none inmbedtls/development. The leak is intest_suite_psa_crypto_se_driver_hal(in test code, not in product code), detected in the components that enable SE support (test_se_defaultandtest_se_full). Example log: https://jenkins-internal.mbed.com/job/mbedtls-psa-release-new/587/execution/node/1066/log/Issue request type
Based on the GCC documentation:
-fsanitize=addressrequires gcc ≥4.8-fsanitize=undefinedrequires gcc ≥4.9-fno-sanitize-recover=allrequires gcc ≥5.1Do we still care about older versions?
Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-961