ASAN/UBSAN can be used to detect memory errors and other common forms of undefined behavior at runtime in debug builds.
- To build Neovim with sanitizers enabled, use
rm -rf build && CMAKE_EXTRA_FLAGS="-DCMAKE_C_COMPILER=clang -DCLANG_ASAN_UBSAN=1" make
- When running Neovim, use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script assumes you have modern versions of gcc, git and curl on your path. | |
HOMEBREW_PREFIX="$1" | |
# From https://github.com/Homebrew/discussions/discussions/254 | |
export HOMEBREW_DEVELOPER=1 | |
export HOMEBREW_CURL_PATH="$(which curl)" | |
export HOMEBREW_GIT_PATH="$(which git)" | |
# From https://docs.brew.sh/Homebrew-on-Linux#alternative-installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
set -e | |
EXTRA_OPTS="--ignore-submodules" | |
mapfile -t status < <(git -c color.status=always status --short $EXTRA_OPTS) | |
if [ ${#status[@]} -eq 0 ]; then | |
printf "\033[93mNothing to commit, working tree clean\033[0m\n" |