summaryrefslogtreecommitdiff
path: root/schulung_tools/mtrace/README
diff options
context:
space:
mode:
Diffstat (limited to 'schulung_tools/mtrace/README')
-rw-r--r--schulung_tools/mtrace/README19
1 files changed, 19 insertions, 0 deletions
diff --git a/schulung_tools/mtrace/README b/schulung_tools/mtrace/README
new file mode 100644
index 0000000..0c61b6d
--- /dev/null
+++ b/schulung_tools/mtrace/README
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# copy original mtrace (perl script)
+cp /usr/bin/mtrace .
+
+# patch it to support new ASLR semantics
+patch -p1 < mtrace.patch
+
+# disable randomization
+setarch `uname -m` -R /bin/bash
+
+# build leaking test program
+make
+
+# run test program and record leaks
+MALLOC_TRACE=./leak.trace ./leak
+
+# view found
+./mtrace ./leak ./leak.trace