本文介绍了GCC 中地址清理器的有意义的堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
限时送ChatGPT账号..
我刚刚尝试使用 GCC 和 -fsanitize=address
标志进行编译.当我运行我的程序时,地址清理器发现了一个缺陷,但堆栈跟踪没有帮助.如何配置它以使其指向我需要查看的源代码位置?
I just tried compiling with GCC and the -fsanitize=address
flag. When I run my program, the address sanitizer finds a flaw, but the stack trace is not helpful. How can I configure this so that it points to the source code locations I need to look at?
推荐答案
这对我有用:
- 确保您已安装 llvm(包括 llvm-symbolizer).
导出以下变量
- Make sure you have installed llvm (including llvm-symbolizer).
Export the following variable
(替换为 llvm-symbolizer 命令的正确路径).
(replace with your correct path to the llvm-symbolizer command).
现在运行你的可执行文件(a.out)
Now run your executable (a.out for now) as
这篇关于GCC 中地址清理器的有意义的堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!