Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locate bad memory access on Solaris

On Linux, FreeBSD and other systems I have valgrind for checking for memory errors like invalid reads and similar. I really love valgrind. Now I have to test code on Solaris/OpenSolaris and can't find a way to get information on invalid reads/writes in an as nice way (or better ;-)) as valgrind there.

When searching for this on the net I find references to libumem, but I get only reports about memory leaks there, not invalid access. What am I missing?

like image 529
johannes Avatar asked Dec 10 '09 14:12

johannes


1 Answers

The dbx included with the Sun Studio compilers includes memory access checking support in its "Run Time Checking" feature (the check subcommand). See:

  • Solaris Studio 12.4 dbx manual: Chapter 9: Using Runtime Checking
  • Debugging Applications with Sun Studio dbx, dbxtool, and the Thread Analyzer
  • Leonard Li's Weblog: Runtime Memory Checking

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

like image 108
alanc Avatar answered Oct 04 '22 16:10

alanc