summaryrefslogtreecommitdiff
path: root/README
blob: 74aab4a1c028f389cc5bf3807ec1cf413768d7d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
portseal - tools to locate port management bugs
===============================================

This is a collection of tools to find bugs related to Mach port
handling like port leaks at runtime.

libpinniped
-----------

libpinniped wraps port manipulation functions (i.e. the glibc
wrappers) with the help of the dynamic linker.  If any of the wrapped
functions fail, a message is written to stderr with a backtrace.

% make -C libpinniped check
make: Entering directory `.../portseal/libpinniped'
LD_PRELOAD=./"libpinniped.so" ./test
./test: mach_port_deallocate (1, 12345): (os/kern) invalid name
./test(dosth+0x1b)[0x80486c8]
./test(main+0xb)[0x80486f2]
/lib/i386-gnu/libc.so.0.3(__libc_start_main+0xbc)[0x109169c]
./test[0x80485d1]
./test: mach_port_destroy (1, 54321): (os/kern) invalid name
./test(dosthelse+0x1b)[0x80486e5]
./test(main+0x10)[0x80486f7]
/lib/i386-gnu/libc.so.0.3(__libc_start_main+0xbc)[0x109169c]
./test[0x80485d1]
make: Leaving directory `.../portseal/libpinniped'
% addr2line -e libpinniped/test 0x80486c8
.../portseal/libpinniped/test.c:24