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

Enable Address Sanitization in Testing #93

Open
plavin opened this issue Nov 4, 2022 · 2 comments
Open

Enable Address Sanitization in Testing #93

plavin opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@plavin
Copy link
Contributor

plavin commented Nov 4, 2022

Right now, address sanitization is not enabled in the Build workflow because it causes the argtable3 tests to fail. Once we either remove arguable or fix it, we can enable ASAN in testing.

@jyoung3131 jyoung3131 added the enhancement New feature or request label May 25, 2023
@jyoung3131
Copy link
Contributor

We need to check if we are using Clang in the CMakeLists. Just run for the Spatter tests - we think that argtable tests are not included since #117 was merged into the mainline.

// Update to check for CLANG
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Use ASAN when debugging
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")

Related to #103 which reports an error with parse_p.

@jyoung3131
Copy link
Contributor

We may want to update the CMakeLists to add the following:

Use for debugging. TODO: Set this automatically

IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
# Use ASAN when debugging
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
ENDIF ()
ENDIF ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants