Add ASan and UBSan CI coverage
All checks were successful
libakerror CI Build / cmake_build (push) Successful in 2m52s
libakerror CI Build / sanitizer (push) Successful in 2m56s
libakerror CI Build / coverage (push) Successful in 2m57s
libakerror CI Build / mutation_test (push) Successful in 37m44s

This commit is contained in:
2026-08-05 13:41:34 -04:00
parent fdb8ffaad0
commit 07fdc82973
2 changed files with 18 additions and 1 deletions

View File

@@ -37,6 +37,23 @@ jobs:
fail_on_failure: 'true'
- run: echo "🍏 This job's status is ${{ job.status }}."
sanitizer:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y cmake gcc moreutils
- name: build with AddressSanitizer and UBSan
run: |
cmake -S . -B build/asan -DAKERR_SANITIZE=address,undefined
cmake --build build/asan
- name: test with AddressSanitizer and UBSan
run: ctest --test-dir build/asan --output-on-failure
- run: echo "🍏 This job's status is ${{ job.status }}."
coverage:
runs-on: ubuntu-latest
steps:

View File

@@ -664,7 +664,7 @@ static akerr_ErrorContext AKERR_NOIGNORE *akerr_reserve_status_range_locked(int
"must not overflow int)",
count, first_status, owner == NULL ? "(null)" : owner,
AKERR_MAX_STATUS_RANGE_OWNER_LENGTH);
last_status = first_status + count - 1;
last_status = first_status + (count - 1);
for ( int i = 0; i < akerr_status_range_count; i++ ) {
if ( first_status <= akerr_status_ranges[i].last &&