Valgrind on macOS Ventura 13.0



我在通过Homebrew在macOS Ventura(13.0(上安装Valgrind时遇到问题。在终点站,我试着跟随。

$ brew install valgrind

在Homebrew的自动更新后,我收到了以下消息:

valgrind: Linux is required for this software.
Error: An unsatisfied requirement failed this build.

有没有办法安装Valgrind?

我想运行Valgrind来调试c

macOS 13.0不支持Valgrind。

最后一个官方支持的版本是10.13。根本不支持苹果硅。

此处提供了一些高达11.0的支持https://github.com/LouisBrunner/valgrind-macos

没有一个Valgrind开发人员正在积极开发Valgrind macOS。苹果公司的捐款为零。我偶尔会做一些更改,但这只是在检查旧代码是否仍然构建的层面。

如果你的软件可以移植到其他操作系统,你最好的选择是在FreeBSD或Linux上测试它。

您可以使用内置的MacOS命令leaks:

$ leaks <your program>

有关使用详细信息,请参阅:

$ man leaks

最新更新