Add ASan and UBSan CI coverage #29
@@ -64,6 +64,22 @@ jobs:
|
|||||||
-I tests \
|
-I tests \
|
||||||
tests/freestanding_fixture.c -o /tmp/freestanding_fixture.o
|
tests/freestanding_fixture.c -o /tmp/freestanding_fixture.o
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- 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:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -676,7 +676,7 @@ static akerr_ErrorContext AKERR_NOIGNORE *akerr_reserve_status_range_locked(int
|
|||||||
"must not overflow int)",
|
"must not overflow int)",
|
||||||
count, first_status, owner == NULL ? "(null)" : owner,
|
count, first_status, owner == NULL ? "(null)" : owner,
|
||||||
AKERR_MAX_STATUS_RANGE_OWNER_LENGTH);
|
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++ ) {
|
for ( int i = 0; i < akerr_status_range_count; i++ ) {
|
||||||
if ( first_status <= akerr_status_ranges[i].last &&
|
if ( first_status <= akerr_status_ranges[i].last &&
|
||||||
|
|||||||
Reference in New Issue
Block a user