Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject known failing MemSan build #1478

Closed
gilles-peskine-arm opened this issue Mar 21, 2018 · 2 comments
Closed

Reject known failing MemSan build #1478

gilles-peskine-arm opened this issue Mar 21, 2018 · 2 comments
Labels
component-platform Portability layer and build scripts enhancement

Comments

@gilles-peskine-arm
Copy link
Contributor

Steps to reproduce (on mbedtls-2.7.0 or 2.8):

scripts/config.pl full
CC=clang cmake -D CMAKE_BUILD_TYPE:String=MemSan .
make
make test

Several tests fail. In fact we know about this — all.sh says

scripts/config.pl unset MBEDTLS_AESNI_C # memsan doesn't grok asm

We should reject the configuration at the cmake or make step. Doing it in cmake may be easier, but doing it at the make step (ideally through a #warning directive so that it's independent of the build system) would have the advantage that it would work even if config.h is changed after running cmake or when using other build systems.

@mpg
Copy link
Contributor

mpg commented Mar 27, 2018

This should be fairly easy to do at the source level:

#if defined(__has_feature)
#if __has_feature(memory_sanitizer)
#warning "This function doesn't work with Memory Sanitizer"
#endif
#endif

We could also try to make the tests actually pass using __attribute__((no_sanitize("memory"))) on some functions (but I'm not sure if it still marks memory written by those functions as initialised) or the sanitizer special case list, though last time I tried the latter approach I couldn't get anywhere.

@RonEld RonEld added the component-platform Portability layer and build scripts label Feb 17, 2019
@gilles-peskine-arm
Copy link
Contributor Author

Fixed in #1560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-platform Portability layer and build scripts enhancement
Projects
None yet
Development

No branches or pull requests

3 participants