curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: cURL Asan testing and LIB ordering

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 13 May 2019 08:52:47 +0200 (CEST)

On Mon, 13 May 2019, Ray Satiro via curl-library wrote:

> COMMON="-fsanitize=address,undefined -fno-sanitize-recover
> -fno-omit-frame-pointer -Wformat -Werror=format-security
> -Werror=array-bounds -g"
>
> CPPFLAGS="${CPPFLAGS:-}" \
> CFLAGS="${CFLAGS:-} $COMMON" \
> CXXFLAGS="${CXXFLAGS:-} $COMMON" \
> LDFLAGS="${LDFLAGS:-} $COMMON -Wl,-rpath,/usr/local/ssl/lib
> -Wl,-rpath,/usr/local/lib" \
> ./configure --enable-debug \
>             --with-ssl=/usr/local/ssl \
>             "$WITH_NGHTTP2" \
>             "$@"

And here's how I mostly do it when running my sanitizer builds:

CC=clang-8
CFLAGS="-fsanitize=address,undefined,signed-integer-overflow
  -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security
  -Werror=array-bounds -g"
CXXFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer
  -Wformat -Werror=format-security -Werror=array-bounds -g"
LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer"
LIBS="-ldl -lubsan"
./configure --disable-shared --enable-debug
  --enable-maintainer-mode --enable-ipv6 --enable-ares=$HOME/src/c-ares
  --with-gssapi --enable-werror --with-ntlm-auth
  --with-libmetalink=/home/daniel/build-libmetalink-bzr
  --with-nghttp2=$HOME/build-nghttp2 --prefix=$HOME/test-curl-install
  --without-libssh2 #--with-libssh2=$HOME/src/libssh2

-- 
  / daniel.haxx.se | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-05-13