File: LeakCheck

package info (click to toggle)
leaktracer 2.4-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 100 kB
  • ctags: 74
  • sloc: cpp: 354; makefile: 86; perl: 67; sh: 17
file content (23 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
if [ $# -lt 1 ] ; then
   echo "Usage: $0 <program [program parameters]>"
   exit 1
fi

# this looks in the same directory, this
# LeakCheck script resides; modify to your
# needs:
SHLIB=`dirname $0`/LeakTracer.so
if [ ! -r $SHLIB ] ; then
    echo "$SHLIB not found"
    exit 1
fi

if [ -z "$LEAKTRACE_FILE" ] ; then
    rm -f leak.out
else
    rm -f "$LEAKTRACE_FILE"
fi
LD_PRELOAD=$SHLIB
export LD_PRELOAD
exec $@