diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2019-05-16 11:29:34 +1200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-16 06:46:18 +0000 |
commit | 93131652a7af622c1dbae016739024150ac38000 (patch) | |
tree | 4a8fec810f1b86e0232c45f0a2c46715327b7b61 /buildtools | |
parent | f0ea08009821805b1abfe2ff3b2a3d5ee96de396 (diff) | |
download | samba-93131652a7af622c1dbae016739024150ac38000.tar.gz |
samba_autoconf: fix undefined behaviour sanitizer compile flags
Added the -g option, -fsaniize=null and -fsanitize=alignment, removed
the -fno-omit-frame-pointer option.
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index be179d8b29b..8e5dfb87102 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -795,13 +795,16 @@ int main(void) { if (Options.options.address_sanitizer or Options.options.undefined_sanitizer): - conf.ADD_CFLAGS('-fno-omit-frame-pointer -O1', testflags=True) + conf.ADD_CFLAGS('-g -O1', testflags=True) if Options.options.address_sanitizer: + conf.ADD_CFLAGS('-fno-omit-frame-pointer', testflags=True) conf.ADD_CFLAGS('-fsanitize=address', testflags=True) conf.ADD_LDFLAGS('-fsanitize=address', testflags=True) conf.env['ADDRESS_SANITIZER'] = True if Options.options.undefined_sanitizer: conf.ADD_CFLAGS('-fsanitize=undefined', testflags=True) + conf.ADD_CFLAGS('-fsanitize=null', testflags=True) + conf.ADD_CFLAGS('-fsanitize=alignment', testflags=True) conf.ADD_LDFLAGS('-fsanitize=undefined', testflags=True) conf.env['UNDEFINED_SANITIZER'] = True |