4992: Add sanitizer runs to bors too, ignore pnglite shift ubsan issue r=Jupeyy a=def-

`@ChillerDragon` 

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2022-04-18 07:46:45 +00:00 committed by GitHub
commit ad56578bde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions

View file

@ -34,7 +34,7 @@ jobs:
- name: Run server and headless client with ASan and UBSan
run: |
cd san
export UBSAN_OPTIONS=log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0
export UBSAN_OPTIONS=suppressions=../ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0
./DDNet "cl_download_skins 0;quit" || true
./DDNet-Server shutdown || true
if test -n "$(find . -maxdepth 1 -name 'SAN.*' -print -quit)"

View file

@ -165,7 +165,7 @@ make
```
and run with:
```bash
UBSAN_OPTIONS=log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0 ./DDNet
UBSAN_OPTIONS=suppressions=./ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0 ./DDNet
```
Check the SAN.\* files afterwards. This finds more problems than memcheck, runs faster, but requires a modern GCC/Clang compiler.

View file

@ -3,6 +3,7 @@ status = [
"build-cmake (ubuntu-20.04)",
"build-cmake (macOS-latest)",
"build-cmake (windows-latest)",
"check-clang-san",
"check-clang-tidy",
"check-style",
]

2
ubsan.supp Normal file
View file

@ -0,0 +1,2 @@
shift-base:pnglite.c
null:json.c