Skip to content
  • Aaron Jones's avatar
    configure: replace --enable-debugging with --enable-compiler-sanitizers · 3f9992da
    Aaron Jones authored
    This enables ASan, UBSan, et al. and supports both GCC and Clang.
    
    Clang support requires an LLVM-bitcode-parsing-capable linker (because
    Clang requires LTO for these sanitizers, and Clang in LTO mode outputs
    LLVM bitcode, instead of machine code, leaving it to the linker to
    translate it after performing its link-time optimisations).
    
    If you need to, pass LDFLAGS="-fuse-ld=lld" to override the LD variable
    set by `./configure` (which isn't used anyway) and use the LLVM linker.
    
    Alternatively, use the Gold linker with the LLVM plugin.
    
    Or just use GCC, but that doesn't support as many sanitizers ...
    
    This commit removes the `--enable-debugging` flag added by commit
    447cda49. It wasn't particularly useful anyway. The build
    system still checks for CFLAGS="-g", with or without this new option, &
    with or without any explicit CFLAGS being passed to `./configure`, so
    that the occasionally-submitted backtraces are at least still somewhat
    useful.
    
    This commit also makes the CI build script pass the following options
    to `./configure`:
    
        --disable-heap-allocator
        --enable-compiler-sanitizers              (this newly-added option)
        --enable-warnings
    
    The former is so that the sanitizers can catch any memory issues. The
    shared heap allocator(s) hide use-after-free problems, because they
    don't taint the memory, or release it back to the OS, after Atheme
    "frees" it.
    3f9992da
To find the state of this project's repository at the time of any of these versions, check out the tags.