Find Poor Memory Access on Solaris

On Linux, FreeBSD, and other systems, I try to check for memory errors such as invalid reads, etc. I really love valgrind. Now I need to test the Solaris / OpenSolaris code and not find a way to get invalid read / write information in a nice way (or better ;-)) like valgrind.

When searching for this on the network, I find links to libumem , but I only get messages about memory leaks there, and not invalid access. What am I missing?

+7
memory-management solaris valgrind
source share
3 answers

dbx, which is part of the Sun Studio compilers, includes support for checking access to memory in its function "Checking the runtime" ( check subcommand). Cm:

The related Sun Memory Error Detection Tool is also available from http://cooltools.sunsource.net/discover/

+6
source share

watchmalloc is a pretty useful library that can be dynamically loaded for your program (usually no recompilation is required) and then sets watchpoints on all commonly problematic memory locations, such as freed areas or after a allocated memory block. If your program accesses one of these invalid areas, it receives a signal, and you can check it in the debugger.

Depending on the configuration, problem areas can be viewed only for writing as well as for reading.

+1
source share

Starting with version 3.11.0, Valgrind runs on Solaris. See Release Notes and Supported Platforms .

More specifically, x86 / Solaris and amd64 / Solaris are now supported. Sparc / Solaris support is still working.

+1
source share

All Articles