build: add asan memory check ci workflow#147
Merged
Conversation
22c84f4 to
e496bc9
Compare
This commit adds a GitHub Actions workflow (`asan.yml`) to detect memory issues in the `argtable3` project using AddressSanitizer (ASan). The workflow triggers on `push` and `pull_request` events targeting the `main` branch. It builds the project with ASan and runs tests to identify memory errors, including leaks and invalid accesses. Purpose: - Ensure memory safety by detecting issues during CI. - Improve code quality and reliability with automated checks.
e496bc9 to
493b395
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds a new GitHub Actions workflow to detect memory issues using AddressSanitizer (ASan).
- Introduces
.github/workflows/asan.ymlto build the project with ASan and run tests under memory checks. - Triggers on pushes and pull requests to the default branch.
- Installs needed dependencies, configures ASan build flags, and reports test failures.
Comments suppressed due to low confidence (3)
.github/workflows/asan.yml:6
- The workflow filters pushes on
master, but the repository usesmainas the default branch. Update tobranches: [ main ]to ensure CI runs as intended.
branches: [ master ]
.github/workflows/asan.yml:27
- Only C flags are instrumented for ASan. To catch memory issues in C++ code, also set
CMAKE_CXX_FLAGSwith the same sanitizer options.
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer" ..
.github/workflows/asan.yml:7
- [nitpick] Pin the
pull_requesttrigger to the default branch (e.g.,branches: [ main ]) to avoid running ASan checks on unintended branches.
pull_request:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a GitHub Actions workflow (
asan.yml) to detect memory issues in theargtable3project using AddressSanitizer (ASan). The workflow triggers onpushandpull_requestevents targeting themainbranch. It builds the project with ASan and runs tests to identify memory errors, including leaks and invalid accesses.Purpose: