diff options
author | Josh Rahm <rahm@google.com> | 2022-07-18 19:37:18 +0000 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-07-18 19:37:18 +0000 |
commit | 308e1940dcd64aa6c344c403d4f9e0dda58d9c5c (patch) | |
tree | 35fe43e01755e0f312650667004487a44d6b7941 /contrib | |
parent | 96a00c7c588b2f38a2424aeeb4ea3581d370bf2d (diff) | |
parent | e8c94697bcbe23a5c7b07c292b90a6b70aadfa87 (diff) | |
download | rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.gz rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.bz2 rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.zip |
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/asan.sh | 28 | ||||
-rw-r--r-- | contrib/flake.lock | 12 | ||||
-rw-r--r-- | contrib/flake.nix | 4 | ||||
-rw-r--r-- | contrib/luarc.json | 1 |
4 files changed, 39 insertions, 6 deletions
diff --git a/contrib/asan.sh b/contrib/asan.sh new file mode 100755 index 0000000000..7e7dffa1af --- /dev/null +++ b/contrib/asan.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Helper script to build and run neovim with Address Sanitizer enabled. +# You may read more information in src/nvim/README.md in the section "Build +# with ASAN". + +shopt -s nullglob + +root_path=$(git rev-parse --show-toplevel) +log_path=$(mktemp -d) +export CC='clang' + +# Change to detect_leaks=1 to detect memory leaks (slower). +export ASAN_OPTIONS="detect_leaks=0:log_path=$log_path/asan" + +# Show backtraces in the logs. +export UBSAN_OPTIONS="print_stacktrace=1" + +make -C "$root_path" CMAKE_EXTRA_FLAGS="-DCLANG_ASAN_UBSAN=ON" +VIMRUNTIME="$root_path"/runtime "$root_path"/build/bin/nvim + +# Need to manually reset terminal to avoid mangled output, nvim does not +# properly restore the terminal when it crashes. +tput reset + +for i in "$log_path"/*; do + cat "$i" +done diff --git a/contrib/flake.lock b/contrib/flake.lock index c4d7f120ba..b72e1f8d5f 100644 --- a/contrib/flake.lock +++ b/contrib/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1629481132, - "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "owner": "numtide", "repo": "flake-utils", - "rev": "997f7efcb746a9c140ce1f13c72263189225f482", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1630074300, - "narHash": "sha256-BFM7OiXRs0RvSUZd6NCGAKWVPn3VodgYQ4TUQXxbMBU=", + "lastModified": 1646254136, + "narHash": "sha256-8nQx02tTzgYO21BP/dy5BCRopE8OwE8Drsw98j+Qoaw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "21c937f8cb1e6adcfeb36dfd6c90d9d9bfab1d28", + "rev": "3e072546ea98db00c2364b81491b893673267827", "type": "github" }, "original": { diff --git a/contrib/flake.nix b/contrib/flake.nix index 848c52d208..a1072674ba 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -16,6 +16,10 @@ neovim = pkgs.neovim-unwrapped.overrideAttrs (oa: { version = "master"; src = ../.; + + buildInputs = oa.buildInputs ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ + CoreServices + ]); }); # a development binary to help debug issues diff --git a/contrib/luarc.json b/contrib/luarc.json index 770b023ac6..8d76d1261d 100644 --- a/contrib/luarc.json +++ b/contrib/luarc.json @@ -5,6 +5,7 @@ "globals": [ "vim", "describe", + "pending", "it", "before_each", "after_each", |