Locate bad memory access on Solaris

好久不见. 提交于 2019-11-29 00:08:35

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

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

sth

watchmalloc is a quite useful library that can be dynamically loaded for your program (usually no need for recompiling) and then sets watchpoints at all the usually problematic memory locations, like freed areas or after an allocated memory block. If your program accesses one of these invalid areas it gets a signal and you can inspect it in the debugger.

Depending on the configuration problematic areas can be watched for writes only, or also for reads.

Since version 3.11.0, Valgrind does run on Solaris. See Release Notes and Supported Platforms.

More precisely, x86/Solaris and amd64/Solaris is now supported. Support for sparc/Solaris is still in works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!