Hash :
db0c0450
Author :
Date :
2019-11-02T15:14:10
Enable more undefined behavior sanitizers Minor fix to xmlStringLenGetNodeList to avoid a pointer overflow during API test. Enable pointer-overflow and unsigned-integer-overflow sanitizers in CI tests. Technically, unsigned integer overflows aren't undefined behavior, but they typically indicate programming errors. Some hash functions that really require unsigned integer overflows have already been annotated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
default:
# The image was generated with the following Dockerfile. It is also used
# for libxslt, that's why we need git and libgcrypt-dev.
#
# FROM ubuntu:19.04
# RUN apt-get update && \
# apt-get upgrade -y && \
# apt-get install -y --no-install-recommends \
# curl git ca-certificates \
# autoconf automake libtool pkg-config \
# make gcc clang llvm \
# python-dev zlib1g-dev liblzma-dev libgcrypt-dev
# WORKDIR /tests
# RUN curl https://www.w3.org/XML/Test/xmlts20080827.tar.gz |tar xz
image: registry.gitlab.gnome.org/gnome/libxml2
.test:
script:
- |
ln -s /tests/xmlconf
sh autogen.sh $CONFIG
make -j$(nproc) V=1 CFLAGS="$CFLAGS -Werror"
make check
gcc:
extends: .test
variables:
CFLAGS: "-O2 -std=c89 -D_XOPEN_SOURCE=700"
clang:asan:
extends: .test
variables:
CONFIG: "--without-python"
CC: clang
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,unsigned-integer-overflow -fno-sanitize-recover=all -Wno-error=cast-align"
UBSAN_OPTIONS: "print_stacktrace=1"
clang:msan:
extends: .test
variables:
CONFIG: "--without-python --without-zlib --without-lzma"
CC: clang
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=memory -Wno-error=cast-align"