I.2 Notes for UNIX platforms
- Need to improve watch point facility in order to speed it up by an order of
magnitudes. This will most likely involve removing all watch points when
entering the library and replacing them when returning to user code.
- Improve use of watch points by allowing an option which will only install write
watch points instead of both read and write watch points. Not only will this
speed up the use of watch points, but will also cause less problems with reading
from misaligned memory allocations.
- There seems to be a problem on some UNIX systems in that the
call will not work unless it is used on memory that has been allocated with
mmap(). This needs to be investigated further.
- Install a signal handler that can be sent a non-terminating signal that would
instruct the mpatrol library to log a list of memory leaks and possibly write
a profile output file. This would be useful for monitoring daemon processes.
- There is currently a problem in that the call stack displayed from within the
illegal memory access signal handler is not necessarily accurate with respect to
the function at the top of the stack. In addition, signal handlers shouldn't
technically call I/O functions in case of additional signals being caught so
this may need to be improved.
- Need to add a way of initialising the thread-safe version of the library when
it is not compiled on a system that supports `.init' sections, or if it is
not compiled with the GNU C compiler, or if it is not compiled with a C++
compiler. Also perhaps need to support other threads packages instead of just
- Need to add support for call stack traversal for the Itanium processor
architecture. The current implementation of call stack traversal for the
Motorola 88xx0 family is also a bit flaky and so should only be used when the
library and program are built unoptimised. This could be improved on DG/UX
platforms by making use of the TDESC information stored in the object files.
- Need to add support for obtaining the program name from the stack for the Alpha,
Itanium and Motorola 88xx0 processor architectures. If there is no support for
determining the filename that a program was invoked with then the
PROGFILE option can be used to specify the program name at run-time.
- If the
MP_LIBRARYSTACK_SUPPORT preprocessor macro is defined when
building the mpatrol library on IRIX platforms then the libexc library
must also be linked in. However, execution speed will fall dramatically since
unwind() function within that library calls
free() and other memory operation functions every time it is invoked.
The only reason to use this library rather than the default method of stack
traversal on MIPS would be if that method failed due to a bug (in which case
it should be reported anyway).
- The mpatrol library
unwind() function on MIPS platforms may have problems
with call stack traversal in alternative stacks, such as those used by signal
handlers. The call stack will then terminate at the point at which the handler
was called rather than unwinding to the top of the stack.
- The library cannot currently read any symbols from shared objects that have been
shl_load() or similar functions1.
In addition, symbols cannot currently be read from any COFF or XCOFF shared
libraries on LynxOS and some work needs to be done to build the mpatrol library
as a shared library on LynxOS.
- Perhaps add support for reading HP/UX executable files and libraries in the SOM
object file format without needing to use the GNU BFD library.
- Perhaps add support for other popular text editors in the mpedit
command. Also add a way to specify editor options to the mpedit
- Add support for SCO UNIX, Ultrix and other non-System V UNIX operating systems.
Also test on NetBSD, OpenBSD and SunOS as support has been written for these
systems but is untested. The SunOS port requires an ANSI C compiler, though.
- The --dynamic option to the mpatrol command does not always
work on systems whose dynamic linkers support the LD_PRELOAD or
_RLD_LIST environment variables. This is because the object file format
access libraries do not exist in shared form on such systems.
- Perhaps add files to build the mpatrol library and tools as BSD packages.