only run expensive UBSAN with probability 6.25% (#4781)

This commit is contained in:
tersec 2023-04-03 16:27:07 +00:00 committed by GitHub
parent e2bf58a6f2
commit 6a0a5c03ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -101,7 +101,11 @@ jobs:
# Stack usage test and UBSAN on recent enough gcc:
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'amd64' ]]; then
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage --passC:-fsanitize=undefined --passL:-fsanitize=undefined"
if [[ '${{ github.sha }}' =~ ^7 ]]; then
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage --passC:-fsanitize=undefined --passL:-fsanitize=undefined"
else
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage"
fi
echo "NIMFLAGS=${NIMFLAGS}" >> $GITHUB_ENV
fi