#!/usr/bin/env bash # # Run magic under valgrind, straight from the build tree. # Generated by configure from scripts/run_magic_valgrind.sh.in. # # This debugs the GUI binary (magicexec); Tk/X allocations make the output noisy, # so for real leak hunting prefer the batch binary (fewer moving parts): # valgrind --leak-check=full "$MAGIC_TCL/magicdnull" -dnull -nowrapper set -eu here="$(cd "$(dirname "$0")" && pwd)" . "$here/magic_run_common.sh" magic_require_built magic_stage exec valgrind --leak-check=full --error-exitcode=0 \ "$MAGIC_TCL/magicexec" -- "$@"