mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
7973713257
/home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:68:16: runtime error: left shift of 170 by 24 places cannot be represented in type 'int' #0 0x1b85f2f in file_read_ul /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:68:16 #1 0x1b7e129 in png_read_ihdr /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:171:2 #2 0x1b7d867 in png_open_read /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:275:11 #3 0xb59f78 in CGraphics_Threaded::LoadPNG(CImageInfo*, char const*, int) /home/runner/work/ddnet/ddnet/src/engine/client/graphics_threaded.cpp:642:14 #4 0xb54e78 in CGraphics_Threaded::LoadTexture(char const*, int, int, int) /home/runner/work/ddnet/ddnet/src/engine/client/graphics_threaded.cpp:517:5 #5 0x18e24f7 in CEditor::Init() /home/runner/work/ddnet/ddnet/src/game/editor/editor.cpp:6354:32 #6 0xa8732e in CClient::Run() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:2917:13 #7 0xaef796 in main /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4462:11 #8 0x7ff6950d80b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #9 0x43ce7d in _start (/home/runner/work/ddnet/ddnet/san/DDNet+0x43ce7d) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:68:16 in
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: Check ASan & UBSan
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- master
|
|
- staging.tmp
|
|
- trying.tmp
|
|
- staging-squash-merge.tmp
|
|
pull_request:
|
|
|
|
jobs:
|
|
check-clang-san:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Prepare linux
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libvulkan-dev glslang-tools spirv-tools -y
|
|
- name: Build with ASan and UBSan
|
|
run: |
|
|
mkdir san
|
|
cd san
|
|
export CC=clang
|
|
export CXX=clang++
|
|
export CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer"
|
|
export CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer"
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DHEADLESS_CLIENT=ON ..
|
|
make -j"$(nproc)"
|
|
- name: Run server and headless client with ASan and UBSan
|
|
run: |
|
|
cd san
|
|
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)"
|
|
then
|
|
cat ./SAN.*
|
|
exit 1
|
|
fi
|