#!/usr/bin/env bash

set -euo pipefail

if [ $# == 0 ] || [ "$1" == '--help' ] || [ "$1" == '-h' ]; then
  cat <<USAGE
Usage: $0 your-program [your-program-options]

Runs a binary (that has been compiled with msan) using the correct symbolizer location.
USAGE

  exit 1
fi

symbolizer="../clang_4_0/usr/lib/llvm-4.0/bin/llvm-symbolizer"

ASAN_SYMBOLIZER_PATH="$symbolizer" MSAN_OPTIONS=keep_going=1 "$@"
