本文介绍了在Solaris上找到错误的内存访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux,FreeBSD和其他系统上,我使用valgrind来检查内存错误,例如无效读取等.我真的很喜欢valgrind.现在,我必须在Solaris/OpenSolaris上测试代码,并且找不到找到与valgrind一样好的方法(或更好的;-))来获取有关无效读/写信息的方法.

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.

在网上搜索此内容时,我会找到对 libumem 的引用,但我只能得到报告那里的内存泄漏,不是无效的访问.我想念什么?

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?

推荐答案

Sun Studio编译器随附的dbx在其运行时检查"功能(check子命令)中包括内存访问检查支持.参见:

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

相关的"Sun Memory Error Discovery Tool"也可以从以下网站获得 http://cooltools.sunsource.net/发现/

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

这篇关于在Solaris上找到错误的内存访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 08:03