ci: native_asan do testovaci sady, jinak bounds fixy nic nechrani

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5 committed 2026-09-02 18:19:40 +02:00
1 parent 5fe3367aaa
commit de5bd52bd9
2 files changed
+15 -1

No files matched your search

+6 -1
View File
@@ -20,7 +20,12 @@ jobs:
uses: ./.github/actions/setup-build-environment
- name: Run Unit Tests
run: pio test -e native -e native_kiss_modem -vv
# native_asan MUSI byt v seznamu. Bounds guardy v Packet::readFrom
# zamerne nemeni navratovou hodnotu (odmitnou presne to, co upstream
# odmitne az po precteni), takze pod `native` projdou i BEZ nich -- rika
# to i hlavicka test_packet_readfrom.cpp. Bez tohohle envu slo ty ctyri
# kontroly z Packet.cpp odstranit a CI zustalo zelene.
run: pio test -e native -e native_asan -e native_kiss_modem -vv
- name: Upload Test Results
# Upload test results even if the test step failed.
+9
View File
@@ -199,6 +199,15 @@ build_flags = -std=c++17
-I src
-I test/mocks
-fsanitize=address,undefined
# Bez -fno-sanitize-recover UBSan nalez jen VYPISE a test dobehne uspesne --
# takze z te poloviny sanitizeru byla jen ozdoba. ASAN abortuje sam.
-fno-sanitize-recover=all
# POZOR na diagnostiku: `pio test` u padu sanitizeru vypise jen
# "Program received signal SIGHUP" a ASAN report SPOLKNE. Necti z toho, ze
# sanitizer nic nenasel -- spust binarku primo:
# pio run -e native_asan -t buildprog && .pio/build/native_asan/program
# Overeno 2. 9. 2026: pres `pio test` jen SIGHUP, primo pak
# "heap-buffer-overflow ... src/Packet.cpp:93 in mesh::Packet::readFrom".
-fno-omit-frame-pointer
-g -O1
build_unflags = -O2