parent
5e645f11b2
commit
6c4c522724
36 changed files with 1013 additions and 1087 deletions
|
|
@ -1,62 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
function usage {
|
||||
cat <<EOF
|
||||
USAGE
|
||||
|
||||
$0 [-h] [-l language-name] [-e example-file-name] [-r repetition-count]
|
||||
|
||||
OPTIONS
|
||||
|
||||
-h print this message
|
||||
|
||||
-l run only the benchmarks for the given language
|
||||
|
||||
-e run only the benchmarks that parse the example file with the given name
|
||||
|
||||
-r parse each sample the given number of times (default 5)
|
||||
|
||||
-g debug
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
mode=normal
|
||||
|
||||
while getopts "hgl:e:r:" option; do
|
||||
case ${option} in
|
||||
h)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
g)
|
||||
mode=debug
|
||||
;;
|
||||
e)
|
||||
export TREE_SITTER_BENCHMARK_EXAMPLE_FILTER=${OPTARG}
|
||||
;;
|
||||
l)
|
||||
export TREE_SITTER_BENCHMARK_LANGUAGE_FILTER=${OPTARG}
|
||||
;;
|
||||
r)
|
||||
export TREE_SITTER_BENCHMARK_REPETITION_COUNT=${OPTARG}
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ $mode == debug ]]; then
|
||||
test_binary=$(
|
||||
cargo bench benchmark -p tree-sitter-cli --no-run --message-format=json 2> /dev/null |
|
||||
jq -rs 'map(select(.target.name == "benchmark" and .executable))[0].executable'
|
||||
)
|
||||
env | grep TREE_SITTER
|
||||
echo "$test_binary"
|
||||
else
|
||||
exec cargo bench benchmark -p tree-sitter-cli
|
||||
fi
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
@echo off
|
||||
|
||||
cargo bench benchmark -p tree-sitter-cli
|
||||
exit /b %errorlevel%
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
set -e
|
||||
|
||||
if [[ $(uname -s) != Linux ]]; then
|
||||
printf 'Fuzzing is only supported on Linux\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CC=${CC:-clang}
|
||||
CXX=${CXX:-clang++}
|
||||
|
||||
default_fuzz_flags=-fsanitize=fuzzer,address,undefined
|
||||
|
||||
export CFLAGS="$default_fuzz_flags $CFLAGS"
|
||||
export CXXFLAGS="$default_fuzz_flags $CXXFLAGS"
|
||||
|
||||
make CC="$CC" CXX="$CXX" libtree-sitter.a
|
||||
|
||||
if [[ -z $* ]]; then
|
||||
mapfile -t languages < <(ls test/fixtures/grammars)
|
||||
else
|
||||
languages=("$@")
|
||||
fi
|
||||
|
||||
mkdir -p test/fuzz/out
|
||||
|
||||
for lang in "${languages[@]}"; do
|
||||
# skip typescript & php
|
||||
if [[ $lang == typescript || $lang == php ]]; then
|
||||
continue
|
||||
fi
|
||||
printf 'Building %s fuzzer...\n' "$lang"
|
||||
lang_dir="test/fixtures/grammars/$lang"
|
||||
lang_grammar="${lang_dir}/src/grammar.json"
|
||||
|
||||
# The following assumes each language is implemented as src/parser.c plus an
|
||||
# optional scanner in src/scanner.c
|
||||
objects=()
|
||||
|
||||
lang_scanner="${lang_dir}/src/scanner"
|
||||
if [[ -f "${lang_scanner}.c" ]]; then
|
||||
$CC $CFLAGS -std=c11 -g -O1 -I "${lang_dir}/src" -c "${lang_scanner}.c" -o "${lang_scanner}.o"
|
||||
objects+=("${lang_scanner}.o")
|
||||
fi
|
||||
|
||||
# Compiling with -O0 speeds up the build dramatically
|
||||
$CC $CFLAGS -g -O0 -I "${lang_dir}/src" "${lang_dir}/src/parser.c" -c -o "${lang_dir}/src/parser.o"
|
||||
objects+=("${lang_dir}/src/parser.o")
|
||||
|
||||
highlights_filename="${lang_dir}/queries/highlights.scm"
|
||||
if [[ -f "${highlights_filename}" ]]; then
|
||||
ts_lang_query_filename="${lang}.scm"
|
||||
cp "${highlights_filename}" "test/fuzz/out/${ts_lang_query_filename}"
|
||||
else
|
||||
ts_lang_query_filename=""
|
||||
fi
|
||||
|
||||
ts_lang="tree_sitter_$(jq -r .name "$lang_grammar")"
|
||||
$CXX $CXXFLAGS -std=c++11 -Ilib/include \
|
||||
-D TS_LANG="$ts_lang" \
|
||||
-D TS_LANG_QUERY_FILENAME="\"${ts_lang_query_filename}\"" \
|
||||
test/fuzz/fuzzer.cc \
|
||||
"${objects[@]}" \
|
||||
libtree-sitter.a \
|
||||
-o "test/fuzz/out/${lang}_fuzzer"
|
||||
|
||||
jq '
|
||||
[ ..
|
||||
| if .type? == "STRING" or (.type? == "ALIAS" and .named? == false) then .value else empty end
|
||||
| select(test("\\S") and length == utf8bytelength)
|
||||
] | unique | .[]
|
||||
' "$lang_grammar" | sort > "test/fuzz/out/${lang}.dict"
|
||||
done
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
declare -a EXPORT_FLAGS
|
||||
while read -r -d, function; do
|
||||
EXPORT_FLAGS+=("-Wl,--export=${function:1:-1}")
|
||||
done < lib/src/wasm/stdlib-symbols.txt
|
||||
|
||||
target/wasi-sdk-21.0/bin/clang-17 \
|
||||
-o stdlib.wasm \
|
||||
-Os \
|
||||
-fPIC \
|
||||
-Wl,--no-entry \
|
||||
-Wl,--stack-first \
|
||||
-Wl,-z -Wl,stack-size=65536 \
|
||||
-Wl,--import-undefined \
|
||||
-Wl,--import-memory \
|
||||
-Wl,--import-table \
|
||||
-Wl,--strip-debug \
|
||||
-Wl,--export=reset_heap \
|
||||
-Wl,--export=__wasm_call_ctors \
|
||||
-Wl,--export=__stack_pointer \
|
||||
"${EXPORT_FLAGS[@]}" \
|
||||
lib/src/wasm/stdlib.c
|
||||
|
||||
xxd -C -i stdlib.wasm > lib/src/wasm/wasm-stdlib.h
|
||||
mv stdlib.wasm target/
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
src_dir=lib/src
|
||||
allocation_functions=(malloc calloc realloc free)
|
||||
|
||||
for function in "${allocation_functions[@]}"; do
|
||||
usages=$(grep -n -E "\b${function}\(" -r $src_dir --exclude alloc.c --exclude stdlib.c)
|
||||
if [[ -n $usages ]]; then
|
||||
printf 'The %s function should not be called directly, but is called here:\n%s\n' "$function" "$usages" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
EMSDK_DIR=target/emsdk
|
||||
EMSCRIPTEN_VERSION=$(< cli/loader/emscripten-version)
|
||||
|
||||
{
|
||||
if [[ ! -f $EMSDK_DIR/emsdk ]]; then
|
||||
printf 'Downloading emscripten SDK...\n'
|
||||
git clone https://github.com/emscripten-core/emsdk.git $EMSDK_DIR
|
||||
fi
|
||||
|
||||
cd $EMSDK_DIR
|
||||
|
||||
printf 'Updating emscripten SDK...\n'
|
||||
git reset --hard
|
||||
git pull
|
||||
./emsdk list
|
||||
|
||||
printf 'Installing emscripten...\n'
|
||||
./emsdk install "$EMSCRIPTEN_VERSION"
|
||||
|
||||
printf 'Activating emscripten...\n'
|
||||
./emsdk activate "$EMSCRIPTEN_VERSION"
|
||||
} >&2
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
GRAMMARS_DIR="$PWD/test/fixtures/grammars"
|
||||
|
||||
fetch_grammar() {
|
||||
local grammar=$1
|
||||
local ref=$2
|
||||
local grammar_dir="${GRAMMARS_DIR}/${grammar}"
|
||||
local grammar_url=https://github.com/tree-sitter/tree-sitter-${grammar}
|
||||
|
||||
printf 'Updating %s grammar...\n' "$grammar"
|
||||
|
||||
if [[ ! -d "$grammar_dir" ]]; then
|
||||
git clone "$grammar_url" "$grammar_dir" --depth=1
|
||||
fi
|
||||
|
||||
git -C "$grammar_dir" fetch origin "$ref" --depth=1
|
||||
git -C "$grammar_dir" reset --hard FETCH_HEAD
|
||||
}
|
||||
|
||||
fetch_grammar bash master
|
||||
fetch_grammar c master
|
||||
fetch_grammar cpp master
|
||||
fetch_grammar embedded-template master
|
||||
fetch_grammar go master
|
||||
fetch_grammar html master
|
||||
fetch_grammar java master
|
||||
fetch_grammar javascript master
|
||||
fetch_grammar jsdoc master
|
||||
fetch_grammar json master
|
||||
fetch_grammar php master
|
||||
fetch_grammar python master
|
||||
fetch_grammar ruby master
|
||||
fetch_grammar rust master
|
||||
fetch_grammar typescript master
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
@echo off
|
||||
|
||||
call:fetch_grammar bash master
|
||||
call:fetch_grammar c master
|
||||
call:fetch_grammar cpp master
|
||||
call:fetch_grammar embedded-template master
|
||||
call:fetch_grammar go master
|
||||
call:fetch_grammar html master
|
||||
call:fetch_grammar java master
|
||||
call:fetch_grammar javascript master
|
||||
call:fetch_grammar jsdoc master
|
||||
call:fetch_grammar json master
|
||||
call:fetch_grammar php master
|
||||
call:fetch_grammar python master
|
||||
call:fetch_grammar ruby master
|
||||
call:fetch_grammar rust master
|
||||
call:fetch_grammar typescript master
|
||||
exit /B 0
|
||||
|
||||
:fetch_grammar
|
||||
setlocal
|
||||
set grammar_dir=test\fixtures\grammars\%~1
|
||||
set grammar_url=https://github.com/tree-sitter/tree-sitter-%~1
|
||||
set grammar_branch=%~2
|
||||
@if not exist %grammar_dir% (
|
||||
git clone %grammar_url% %grammar_dir% --depth=1
|
||||
)
|
||||
pushd %grammar_dir%
|
||||
git fetch origin %2 --depth=1
|
||||
git reset --hard FETCH_HEAD
|
||||
popd
|
||||
exit /B 0
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
output_path=lib/binding_rust/bindings.rs
|
||||
header_path=lib/include/tree_sitter/api.h
|
||||
no_derive_copy=(
|
||||
TSInput
|
||||
TSLanguage
|
||||
TSLogger
|
||||
TSLookaheadIterator
|
||||
TSParser
|
||||
TSTree
|
||||
TSQuery
|
||||
TSQueryCursor
|
||||
TSQueryCapture
|
||||
TSQueryMatch
|
||||
TSQueryPredicateStep
|
||||
)
|
||||
no_copy=$(IFS='|'; echo "${no_derive_copy[*]}")
|
||||
|
||||
file_version=$(head -n1 "$output_path" | cut -d' ' -f6)
|
||||
tool_version=$(bindgen --version | cut -d' ' -f2)
|
||||
higher_version=$(printf '%s\n' "$file_version" "$tool_version" | sort -V | tail -n1)
|
||||
|
||||
if [[ "$higher_version" != "$tool_version" ]]; then
|
||||
printf 'Latest used bindgen version was %s\n' "$file_version" >&2
|
||||
printf 'Currently installed bindgen CLI version is %s\n\n' "$tool_version" >&2
|
||||
# shellcheck disable=SC2016
|
||||
printf 'You must upgrade bindgen CLI first with `cargo install bindgen-cli`\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bindgen \
|
||||
--no-layout-tests \
|
||||
--allowlist-type '^TS.*' \
|
||||
--allowlist-function '^ts_.*' \
|
||||
--allowlist-var '^TREE_SITTER.*' \
|
||||
--blocklist-type '^__.*' \
|
||||
--no-prepend-enum-name \
|
||||
--no-copy "$no_copy" \
|
||||
--use-core \
|
||||
"$header_path" \
|
||||
-- \
|
||||
-D TREE_SITTER_FEATURE_WASM \
|
||||
> "$output_path"
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
ROOT_DIR="$PWD"
|
||||
GRAMMARS_DIR="$ROOT_DIR/test/fixtures/grammars"
|
||||
|
||||
if [[ $CI == true ]]; then
|
||||
set -x
|
||||
else
|
||||
cargo build --release
|
||||
TREE_SITTER="$ROOT_DIR/target/release/tree-sitter"
|
||||
fi
|
||||
|
||||
filter_grammar_name="$1"
|
||||
|
||||
while read -r grammar_file; do
|
||||
grammar_dir="${grammar_file%/*}"
|
||||
grammar_name="${grammar_dir##*/}"
|
||||
|
||||
if [[ -n $filter_grammar_name && "$filter_grammar_name" != "$grammar_name" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
printf 'Regenerating %s parser\n' "$grammar_name"
|
||||
(cd "$grammar_dir" && "$TREE_SITTER" generate src/grammar.json --abi=latest)
|
||||
done < <(find "$GRAMMARS_DIR" -name grammar.js -not -path '*/node_modules/*')
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
ROOT_DIR="$PWD"
|
||||
GRAMMARS_DIR="$ROOT_DIR/test/fixtures/grammars"
|
||||
|
||||
if [[ $CI == true ]]; then
|
||||
set -x
|
||||
else
|
||||
cargo build --release
|
||||
TREE_SITTER="$ROOT_DIR/target/release/tree-sitter"
|
||||
fi
|
||||
|
||||
build_wasm_args=
|
||||
if [[ $1 == --docker ]]; then
|
||||
build_wasm_args=--docker
|
||||
shift
|
||||
fi
|
||||
|
||||
filter_grammar_name="$1"
|
||||
|
||||
while read -r grammar_file; do
|
||||
grammar_dir="${grammar_file%/*}"
|
||||
grammar_name="${grammar_dir##*/}"
|
||||
|
||||
if [[ -n $filter_grammar_name && "$filter_grammar_name" != "$grammar_name" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
printf 'Compiling %s parser to wasm\n' "$grammar_name"
|
||||
"$TREE_SITTER" build --wasm $build_wasm_args -o "target/release/tree-sitter-${grammar_name}.wasm" "$grammar_dir"
|
||||
done < <(find "$GRAMMARS_DIR" -name grammar.js -not -path '*/node_modules/*')
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
@echo off
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
set tree_sitter="%cd%\target\release\tree-sitter"
|
||||
|
||||
for /f "tokens=*" %%f in ('dir test\fixtures\grammars\grammar.js /b/s') do (
|
||||
pushd "%%f\.."
|
||||
echo Regenerating parser !cd!
|
||||
%tree_sitter% generate src\grammar.json --abi=latest
|
||||
popd
|
||||
)
|
||||
|
||||
exit /B 0
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Usage:
|
||||
# script/heap-profile
|
||||
#
|
||||
# Parse an example source file and record memory usage
|
||||
#
|
||||
# Dependencies:
|
||||
# * `pprof` executable: https://github.com/google/pprof
|
||||
# * `gperftools` package: https://github.com/gperftools/gperftools
|
||||
|
||||
set -e
|
||||
|
||||
GRAMMARS_DIR="$PWD/test/fixtures/grammars"
|
||||
|
||||
# Build the library
|
||||
make libtree-sitter.a
|
||||
|
||||
# Build the heap-profiling harness
|
||||
clang++ \
|
||||
-Wno-reorder-init-list \
|
||||
-Wno-c99-designator \
|
||||
-I lib/include \
|
||||
-I "$GRAMMARS_DIR" \
|
||||
-D GRAMMARS_DIR="\"${GRAMMARS_DIR}/\"" \
|
||||
test/profile/heap.cc \
|
||||
-l tcmalloc \
|
||||
libtree-sitter.a \
|
||||
-o target/heap-profile
|
||||
|
||||
# Run the harness with heap profiling enabled.
|
||||
export HEAPPROFILE="$PWD/profile"
|
||||
target/heap-profile "$@"
|
||||
|
||||
# Extract statistics using pprof.
|
||||
pprof -top -cum profile.0001.heap
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if (($# < 3)); then
|
||||
echo "usage: $0 <language> <halt|recover> <testcase> [libFuzzer args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eu
|
||||
|
||||
export ASAN_OPTIONS=quarantine_size_mb=10:detect_leaks=1:symbolize=1
|
||||
export UBSAN=print_stacktrace=1:halt_on_error=1:symbolize=1
|
||||
|
||||
# check if CI env var exists
|
||||
if [[ -z ${CI:-} ]]; then
|
||||
declare -A mode_config=(
|
||||
[halt]='-timeout=1 -rss_limit_mb=2048'
|
||||
[recover]='-timeout=10 -rss_limit_mb=2048'
|
||||
)
|
||||
else
|
||||
declare -A mode_config=(
|
||||
[halt]='-max_total_time=120 -timeout=1 -rss_limit_mb=2048'
|
||||
[recover]='-time=120 -timeout=10 -rss_limit_mb=2048'
|
||||
)
|
||||
fi
|
||||
|
||||
lang="$1"
|
||||
shift
|
||||
mode="$1"
|
||||
shift
|
||||
testcase="$1"
|
||||
shift
|
||||
# Treat remainder of arguments as libFuzzer arguments
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
test/fuzz/out/${lang}_fuzzer ${mode_config[$mode]} -runs=1 "$testcase" "$@"
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if (($# < 2)); then
|
||||
echo "usage: $0 <language> <halt|recover> [libFuzzer args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eu
|
||||
|
||||
export ASAN_OPTIONS=quarantine_size_mb=10:detect_leaks=1:symbolize=1
|
||||
export UBSAN=print_stacktrace=1:halt_on_error=1:symbolize=1
|
||||
|
||||
# check if CI env var exists
|
||||
if [[ -z ${CI:-} ]]; then
|
||||
declare -A mode_config=(
|
||||
[halt]='-timeout=1 -rss_limit_mb=2048'
|
||||
[recover]='-timeout=10 -rss_limit_mb=2048'
|
||||
)
|
||||
else
|
||||
declare -A mode_config=(
|
||||
[halt]='-max_total_time=120 -timeout=1 -rss_limit_mb=2048'
|
||||
[recover]='-time=120 -timeout=10 -rss_limit_mb=2048'
|
||||
)
|
||||
fi
|
||||
|
||||
lang="$1"
|
||||
shift
|
||||
mode="$1"
|
||||
shift
|
||||
# Treat remainder of arguments as libFuzzer arguments
|
||||
|
||||
# Fuzzing logs and testcases are always written to `pwd`, so `cd` there first
|
||||
results="$PWD/test/fuzz/out/fuzz-results/${lang}"
|
||||
mkdir -p "${results}"
|
||||
cd "${results}"
|
||||
|
||||
# Create a corpus directory, so new discoveries are stored on disk. These will
|
||||
# then be loaded on subsequent fuzzing runs
|
||||
mkdir -p corpus
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
../../${lang}_fuzzer -dict="../../${lang}.dict" -artifact_prefix=${lang}_ -max_len=2048 ${mode_config[$mode]} corpus "$@"
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
root=$PWD
|
||||
cd docs
|
||||
|
||||
bundle exec jekyll serve "$@" &
|
||||
|
||||
bundle exec ruby <<RUBY &
|
||||
require "listen"
|
||||
|
||||
def copy_wasm_files
|
||||
`cp $root/lib/binding_web/tree-sitter.{js,wasm} $root/docs/assets/js/`
|
||||
`cp $root/target/release/*.wasm $root/docs/assets/js/`
|
||||
end
|
||||
|
||||
puts "Copying WASM files to docs folder..."
|
||||
copy_wasm_files
|
||||
|
||||
puts "Watching release directory"
|
||||
listener = Listen.to("$root/lib/binding_web", only: /^tree-sitter\.(js|wasm)$/, wait_for_delay: 2) do
|
||||
puts "WASM files updated. Copying new files to docs folder..."
|
||||
copy_wasm_files
|
||||
end
|
||||
|
||||
listener.start
|
||||
sleep
|
||||
RUBY
|
||||
|
||||
wait
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const {statSync} = require('fs');
|
||||
const {execFileSync} = require('child_process');
|
||||
const libPath = process.argv[2];
|
||||
|
||||
if (!libPath || libPath === '--help') {
|
||||
console.log(`Usage: ${process.argv[1]} <dylib-path>`);
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
// Get total file size
|
||||
const totalSize = statSync(libPath).size
|
||||
|
||||
// Dump symbols with addresses
|
||||
const output = execFileSync(
|
||||
'nm',
|
||||
['-t', 'd', libPath],
|
||||
{encoding: 'utf8'}
|
||||
);
|
||||
|
||||
// Parse addresses
|
||||
const addressEntries = [];
|
||||
for (const line of output.split('\n')) {
|
||||
const [address, _, name] = line.split(/\s+/);
|
||||
if (address && name) {
|
||||
addressEntries.push({name, address: parseInt(address)})
|
||||
}
|
||||
}
|
||||
|
||||
// Compute sizes by subtracting addresses
|
||||
addressEntries.sort((a, b) => a.address - b.address);
|
||||
const sizeEntries = addressEntries.map(({name, address}, i) => {
|
||||
const next = addressEntries[i + 1] ? addressEntries[i + 1].address : totalSize;
|
||||
const size = next - address;
|
||||
return {name, size}
|
||||
})
|
||||
|
||||
function formatSize(sizeInBytes) {
|
||||
return sizeInBytes > 1024
|
||||
? `${(sizeInBytes / 1024).toFixed(1)} kb`
|
||||
: `${sizeInBytes} b`
|
||||
}
|
||||
|
||||
// Display sizes
|
||||
sizeEntries.sort((a, b) => b.size - a.size);
|
||||
console.log('total'.padEnd(64, ' '), '\t', formatSize(totalSize));
|
||||
for (const entry of sizeEntries) {
|
||||
console.log(entry.name.padEnd(64, ' '), '\t', formatSize(entry.size));
|
||||
}
|
||||
101
script/test
101
script/test
|
|
@ -1,101 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
function usage {
|
||||
cat <<EOF
|
||||
USAGE
|
||||
|
||||
$0 [-adDg] [-s SEED] [-l LANGUAGE] [-e EXAMPLE]
|
||||
|
||||
OPTIONS
|
||||
|
||||
-h Print this message
|
||||
|
||||
-a Compile C code with the Clang address sanitizer
|
||||
|
||||
-e Run only the corpus tests whose name contain the given string
|
||||
|
||||
-i Run the given number of iterations of randomized tests (default 10)
|
||||
|
||||
-s Set the seed used to control random behavior
|
||||
|
||||
-d Print parsing log to stderr
|
||||
|
||||
-D Generate an SVG graph of parsing logs
|
||||
|
||||
-g Run the tests with a debugger
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
export RUST_BACKTRACE=full
|
||||
|
||||
mode=normal
|
||||
test_flags=()
|
||||
|
||||
while getopts "adDghl:e:s:i:" option; do
|
||||
case ${option} in
|
||||
h)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
a)
|
||||
export CFLAGS=-fsanitize=undefined,address
|
||||
|
||||
# When the Tree-sitter C library is compiled with the address sanitizer, the address sanitizer
|
||||
# runtime library needs to be linked into the final test executable. When using Xcode clang,
|
||||
# the Rust linker doesn't know where to find that library, so we need to specify linker flags directly.
|
||||
runtime_dir=$(cc -print-runtime-dir)
|
||||
if [[ $runtime_dir == */Xcode.app/* ]]; then
|
||||
export RUSTFLAGS="-C link-arg=-L${runtime_dir} -C link-arg=-lclang_rt.asan_osx_dynamic -C link-arg=-Wl,-rpath,${runtime_dir}"
|
||||
fi
|
||||
|
||||
# Specify a `--target` explicitly. This is required for address sanitizer support.
|
||||
toolchain=$(rustup show active-toolchain)
|
||||
toolchain_regex='(stable|beta|nightly)-([_a-z0-9-]+).*'
|
||||
if [[ $toolchain =~ $toolchain_regex ]]; then
|
||||
release=${BASH_REMATCH[1]}
|
||||
current_target=${BASH_REMATCH[2]}
|
||||
else
|
||||
printf "Failed to parse toolchain '%s'\n" "$toolchain" >&2
|
||||
fi
|
||||
|
||||
test_flags+=("--target=$current_target")
|
||||
;;
|
||||
e)
|
||||
export TREE_SITTER_EXAMPLE=${OPTARG}
|
||||
;;
|
||||
s)
|
||||
export TREE_SITTER_SEED=${OPTARG}
|
||||
;;
|
||||
i)
|
||||
export TREE_SITTER_ITERATIONS=${OPTARG}
|
||||
;;
|
||||
d)
|
||||
export TREE_SITTER_LOG=1
|
||||
;;
|
||||
D)
|
||||
export TREE_SITTER_LOG_GRAPHS=1
|
||||
;;
|
||||
g)
|
||||
mode=debug
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
if [[ ${mode} == debug ]]; then
|
||||
test_binary=$(
|
||||
cargo test "${test_flags[@]}" --no-run --message-format=json 2> /dev/null |
|
||||
jq -rs 'map(select(.target.name == "tree-sitter-cli" and .executable))[0].executable'
|
||||
)
|
||||
lldb "${test_binary}" -- "$1"
|
||||
else
|
||||
cargo test "${test_flags[@]}" "$1" -- --nocapture
|
||||
fi
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd lib/binding_web
|
||||
|
||||
if [[ ! -d node_modules/chai ]] || [[ ! -d node_modules/mocha ]]; then
|
||||
printf 'Installing test dependencies...\n'
|
||||
npm install
|
||||
fi
|
||||
|
||||
node_modules/.bin/mocha
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
@echo off
|
||||
|
||||
setlocal
|
||||
set RUST_TEST_THREADS=1
|
||||
set RUST_BACKTRACE=full
|
||||
cargo test "%~1"
|
||||
if %errorlevel% NEQ 0 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
endlocal
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
function scan_build {
|
||||
extra_args=()
|
||||
|
||||
# AFAICT, in the trusty travis container the scan-build tool is from the 3.4
|
||||
# installation. Therefore, by default it will use clang-3.4 when analysing code
|
||||
# which doesn't support the '-std=c++14' (it is available via '-std=c++1y').
|
||||
# Use the system-wide installed clang instead which is 3.5 and does support
|
||||
# '-std=c++14'.
|
||||
extra_args+=("--use-analyzer=$(command -v clang)")
|
||||
|
||||
# scan-build will try to guess which CXX should be used to compile the actual
|
||||
# code, which is usually g++ but we need g++5 in the CI. Explicitly pass
|
||||
# $CC/$CXX to scan-build if they are set in the environment.
|
||||
|
||||
if [[ -n $CC ]]; then
|
||||
extra_args+=("--use-cc=$CC")
|
||||
fi
|
||||
|
||||
if [[ -n $CXX ]]; then
|
||||
extra_args+=("--use-c++=$CXX")
|
||||
fi
|
||||
|
||||
scan-build "${extra_args[@]}" --status-bugs -disable-checker deadcode.DeadStores "$@"
|
||||
}
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
# Errors
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZN6option6Parser9workhorseEbPKNS_10DescriptorEiPPKcRNS0_6ActionEbbi
|
||||
fun:_ZN6option6Parser5parseEbPKNS_10DescriptorEiPPKcPNS_6OptionES8_ibi
|
||||
fun:_ZN6option6ParserC1EPKNS_10DescriptorEiPPcPNS_6OptionES7_ibi
|
||||
fun:_ZN6bandit6detail7optionsC1EiPPc
|
||||
fun:_ZN6bandit3runEiPPc
|
||||
fun:main
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZN6option6Parser9workhorseEbPKNS_10DescriptorEiPPKcRNS0_6ActionEbbi
|
||||
fun:_ZN6option5Stats3addEbPKNS_10DescriptorEiPPKcib
|
||||
fun:_ZN6option5StatsC1EPKNS_10DescriptorEiPPcib
|
||||
fun:_ZN6bandit6detail7optionsC1EiPPc
|
||||
fun:_ZN6bandit3runEiPPc
|
||||
fun:main
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZN6option6Parser9workhorseEbPKNS_10DescriptorEiPPKcRNS0_6ActionEbbi
|
||||
fun:_ZN6bandit6detail7optionsC2EiPPc
|
||||
fun:_ZN6bandit3runEiPPc
|
||||
fun:main
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Value8
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc
|
||||
fun:_ZN9snowhouse6Assert4ThatIPKcNS_16EqualsConstraintINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvRKT_RKT0_S3_i
|
||||
fun:_ZNSt3__110__function6__funcIZZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE9ts_parserE_clES9_SA_ENKUlvE_clEvEUlvE0_NS7_ISD_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE9ts_parserE_clES9_SA_EUlvE_NS7_ISC_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Addr1
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc
|
||||
fun:_ZN9snowhouse6Assert4ThatIPKcNS_16EqualsConstraintINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvRKT_RKT0_S3_i
|
||||
fun:_ZNSt3__110__function6__funcIZZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE9ts_parserE_clES9_SA_ENKUlvE_clEvEUlvE0_NS7_ISD_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE9ts_parserE_clES9_SA_EUlvE_NS7_ISC_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc
|
||||
fun:_ZN9snowhouse6Assert4ThatIPKcNS_16EqualsConstraintINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvRKT_RKT0_S3_i
|
||||
fun:_ZNSt3__110__function6__funcIZZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE9ts_parserE_clES9_SA_ENKUlvE_clEvEUlvE0_NS7_ISD_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE9ts_parserE_clES9_SA_EUlvE_NS7_ISC_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZN9snowhouse6Assert4ThatINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_16EqualsConstraintIS8_EEEEvRKT_RKT0_PKci
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlvE3_clEvEUlvE0_NS_9allocatorIS5_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZNK3$_0clEvENKUlvE_clEvEUlvE3_NS_9allocatorIS4_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Value8
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNK9snowhouse16EqualsConstraintINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEclIS7_EEbRKT_
|
||||
fun:_ZN9snowhouse6Assert4ThatINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_16EqualsConstraintIS8_EEEEvRKT_RKT0_PKci
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlvE3_clEvEUlvE0_NS_9allocatorIS5_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZNK3$_0clEvENKUlvE_clEvEUlvE3_NS_9allocatorIS4_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZN9snowhouse6Assert4ThatINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_16EqualsConstraintIS8_EEEEvRKT_RKT0_PKci
|
||||
fun:_ZNSt3__110__function6__funcIZZNK3$_0clEvENKUlvE_clEvEUlvE1_NS_9allocatorIS4_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcI3$_0NS_9allocatorIS2_EEFvvEEclEv
|
||||
fun:_ZN6bandit3runERKNS_6detail7optionsERKNSt3__14listINS4_8functionIFvvEEENS4_9allocatorIS8_EEEERNS4_5dequeIPNS0_7contextENS9_ISG_EEEERNS0_8listenerE
|
||||
fun:_ZN6bandit3runEiPPc
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Value8
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNK9snowhouse16EqualsConstraintINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEclIS7_EEbRKT_
|
||||
fun:_ZN9snowhouse6Assert4ThatINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_16EqualsConstraintIS8_EEEEvRKT_RKT0_PKci
|
||||
fun:_ZNSt3__110__function6__funcIZZNK3$_0clEvENKUlvE_clEvEUlvE1_NS_9allocatorIS4_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcI3$_0NS_9allocatorIS2_EEFvvEEclEv
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZN9snowhouse6Assert4ThatINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_16EqualsConstraintIS8_EEEEvRKT_RKT0_PKci
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlvE4_clEvEUlvE0_NS_9allocatorIS5_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZNK3$_0clEvENKUlvE_clEvEUlvE4_NS_9allocatorIS4_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Value8
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNK9snowhouse16EqualsConstraintINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEclIS7_EEbRKT_
|
||||
fun:_ZN9snowhouse6Assert4ThatINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_16EqualsConstraintIS8_EEEEvRKT_RKT0_PKci
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlvE4_clEvEUlvE0_NS_9allocatorIS5_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZNK3$_0clEvENKUlvE_clEvEUlvE4_NS_9allocatorIS4_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Cond
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc
|
||||
fun:_ZN9snowhouse6Assert4ThatIPKcNS_16EqualsConstraintINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvRKT_RKT0_S3_i
|
||||
fun:_ZNSt3__110__function6__funcIZZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPF9ts_parservEE_clES9_SC_ENKUlvE_clEvEUlvE0_NS7_ISF_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPF9ts_parservEE_clES9_SC_EUlvE_NS7_ISE_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZNK3$_0clEvEUlvE_NS_9allocatorIS3_EEFvvEEclEv
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Addr1
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc
|
||||
fun:_ZN9snowhouse6Assert4ThatIPKcNS_16EqualsConstraintINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvRKT_RKT0_S3_i
|
||||
fun:_ZNSt3__110__function6__funcIZZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPF9ts_parservEE_clES9_SC_ENKUlvE_clEvEUlvE0_NS7_ISF_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPF9ts_parservEE_clES9_SC_EUlvE_NS7_ISE_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
}
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Value8
|
||||
fun:_platform_memcmp
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm
|
||||
fun:_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc
|
||||
fun:_ZN9snowhouse6Assert4ThatIPKcNS_16EqualsConstraintINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvRKT_RKT0_S3_i
|
||||
fun:_ZNSt3__110__function6__funcIZZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPF9ts_parservEE_clES9_SC_ENKUlvE_clEvEUlvE0_NS7_ISF_EEFvvEEclEv
|
||||
fun:_ZNSt3__110__function6__funcIZN6bandit2itEPKcNS_8functionIFvvEEERNS2_6detail8listenerERNS_5dequeIPNS8_7contextENS_9allocatorISD_EEEERNS2_8adapters17assertion_adapterERKNS8_10run_policyEEUlvE1_NSE_ISO_EES6_EclEv
|
||||
fun:_ZN6bandit8adapters17snowhouse_adapter16adapt_exceptionsENSt3__18functionIFvvEEE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEERNS_8adapters17assertion_adapterERKNS6_10run_policyE
|
||||
fun:_ZN6bandit2itEPKcNSt3__18functionIFvvEEE
|
||||
fun:_ZNSt3__110__function6__funcIZZZNK3$_0clEvENKUlvE_clEvENKUlNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPF9ts_parservEE_clES9_SC_EUlvE_NS7_ISE_EEFvvEEclEv
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEERNS_6detail8listenerERNS2_5dequeIPNS6_7contextENS2_9allocatorISB_EEEEb
|
||||
fun:_ZN6bandit8describeEPKcNSt3__18functionIFvvEEE
|
||||
}
|
||||
|
||||
# Leaks
|
||||
|
||||
{
|
||||
<insert_a_suppression_name_here>
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: possible
|
||||
fun:malloc_zone_malloc
|
||||
fun:_objc_copyClassNamesForImage
|
||||
fun:_ZL9protocolsv
|
||||
fun:_Z9readClassP10objc_classbb
|
||||
fun:gc_init
|
||||
fun:_ZL33objc_initializeClassPair_internalP10objc_classPKcS0_S0_
|
||||
fun:layout_string_create
|
||||
fun:_ZL12realizeClassP10objc_class
|
||||
fun:_ZL22copySwiftV1MangledNamePKcb
|
||||
fun:_ZL22copySwiftV1MangledNamePKcb
|
||||
fun:_ZL22copySwiftV1MangledNamePKcb
|
||||
fun:_ZL22copySwiftV1MangledNamePKcb
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue