diff options
| author | Mark Adler <git@madler.net> | 2026-01-10 11:32:51 -0800 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-01-10 21:40:07 -0800 |
| commit | 78832f5fe380c5fcfd720012ecc45230640d7906 (patch) | |
| tree | 01996314f1ae7cd516c2c398a9ad7df0c884b176 | |
| parent | 2896db600d9f4520e036dd8f5d6e16ef54218f26 (diff) | |
| download | zlib-78832f5fe380c5fcfd720012ecc45230640d7906.tar.gz zlib-78832f5fe380c5fcfd720012ecc45230640d7906.tar.bz2 zlib-78832f5fe380c5fcfd720012ecc45230640d7906.zip | |
Add --undefined option to ./configure for UBSan checker.
| -rwxr-xr-x | configure | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -92,6 +92,7 @@ warn=0 | |||
| 92 | debug=0 | 92 | debug=0 |
| 93 | address=0 | 93 | address=0 |
| 94 | memory=0 | 94 | memory=0 |
| 95 | undefined=0 | ||
| 95 | insecure=0 | 96 | insecure=0 |
| 96 | unknown=0 | 97 | unknown=0 |
| 97 | old_cc="$CC" | 98 | old_cc="$CC" |
| @@ -147,6 +148,7 @@ case "$1" in | |||
| 147 | --sanitize) address=1; shift ;; | 148 | --sanitize) address=1; shift ;; |
| 148 | --address) address=1; shift ;; | 149 | --address) address=1; shift ;; |
| 149 | --memory) memory=1; shift ;; | 150 | --memory) memory=1; shift ;; |
| 151 | --undefined) undefined=1; shift ;; | ||
| 150 | --insecure) insecure=1; shift ;; | 152 | --insecure) insecure=1; shift ;; |
| 151 | *) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;; | 153 | *) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;; |
| 152 | esac | 154 | esac |
| @@ -258,6 +260,9 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then | |||
| 258 | if test $memory -eq 1; then | 260 | if test $memory -eq 1; then |
| 259 | CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer" | 261 | CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer" |
| 260 | fi | 262 | fi |
| 263 | if test $undefined -eq 1; then | ||
| 264 | CFLAGS="${CFLAGS} -g -fsanitize=undefined -fno-omit-frame-pointer" | ||
| 265 | fi | ||
| 261 | if test $insecure -eq 1; then | 266 | if test $insecure -eq 1; then |
| 262 | CFLAGS="${CFLAGS} -DZLIB_INSECURE" | 267 | CFLAGS="${CFLAGS} -DZLIB_INSECURE" |
| 263 | fi | 268 | fi |
