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

Run clang's MemorySanitizer in CI #1366

Open
xvzcf opened this issue Jan 20, 2023 · 2 comments
Open

Run clang's MemorySanitizer in CI #1366

xvzcf opened this issue Jan 20, 2023 · 2 comments
Labels
enhancement New feature or request future-work Will not be fixed in current release cycle

Comments

@xvzcf
Copy link
Contributor

xvzcf commented Jan 20, 2023

In compiler_opts.cmake, we have the following code:

elseif(USE_SANITIZER STREQUAL "Memory")
    add_compile_options(-fsanitize=address)
    set(SANITIZER_LD_FLAGS "-fsanitize=memory")
elseif(USE_SANITIZER STREQUAL "MemoryWithOrigins")
...

I opened this issue to ask whether we should be running a memory-sanitizer build regularly to test this option.

@dstebila
Copy link
Member

Your point is that it should be add_compile_options(-fsanitize=memory)? Yes, let's fix that.

As for running it regularly in CI, sure, if the runtime is not problematic.

@baentsch baentsch added enhancement New feature or request good first issue Issue for new contributors labels Jul 18, 2023
@SWilson4
Copy link
Member

I tried running the tests with the memory sanitizer turned on after creating #1680. The build was intensive, and the tests failed very loudly. Interestingly enough there were quite a few complaints about functions in libcrypto, so some of the failures might be beyond our control. (That said, the tests also failed loudly with -DOQS_USE_OPENSSL=OFF.)

#1680 contains the one-line fix for the compile flag, so I'm going to preemptively rename this issue to clarify that it's tracking the proposed CI configuration. However, I think it will be a significant amount of work to get the memory sanitizer working in CI.

@SWilson4 SWilson4 changed the title Wrong flag passed to Clang when memory sanitizer build is requested. Run clang's MemorySanitizer in CI Jan 26, 2024
@SWilson4 SWilson4 added future-work Will not be fixed in current release cycle and removed good first issue Issue for new contributors labels Jan 26, 2024
@ajbozarth ajbozarth moved this to Todo in liboqs planning Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future-work Will not be fixed in current release cycle
Projects
Status: Todo
Development

No branches or pull requests

4 participants