为什么是“启用地址消毒器”在Xcode 7中禁用? [英] Why is "Enable Address Sanitizer" disabled in Xcode 7?

查看:600
本文介绍了为什么是“启用地址消毒器”在Xcode 7中禁用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了



有一些解释,其他选项是如何解散,但没有提到为什么杀毒选项将被禁用:


一些诊断工具与其他人结合使用; 诊断窗格上的可用选项将被启用和禁用,因为选择了不同的选项以帮助您选择选项组合。例如,启用地址sanitizer和其他不兼容的工具已停用,无法选择


查看 Clang 3.8的Addresssanitizer 文档,它看起来也可以通过添加一个标志来启用: -fsanitize = address



同样可以找到这个答案,但是它是相当复杂,可能已过时,因为它回溯到2013年。

解决方案

您目前无法同时使用Guard Malloc和Address Sanitizer。选择启用Guard Malloc复选框将禁用Enable Address Sanitizer复选框。如果要使用Address Sanitizer,请取消选中启用Guard Malloc复选框。


I read about the Runtime Sanitization in the Apple docs in the new Xcode 7, so I looked for it, and found that it's disabled. I'm using Xcode 7 GM seed.

When I go into the Run action of the scheme > Diagnostics tab, the Enable Address Sanitizer option is disabled:

There is some explanation about how other options are disbled, but no mention of why the sanitization option would be disabled:

Some diagnostic tools can be used in combination with others; the options available on the Diagnostics pane are enabled and disabled as different options are chosen to help you select option combinations. For example, enable the address sanitizer and other, incompatible tools are disabled and cannot be chosen

Looking at the Clang 3.8 documentation for Addresssanitizer, it looks like it can also be enabled, by adding a flag: -fsanitize=address. But where this flag should be used in the build settings is a mystery, and questionable since it also exists as a checkbox option in the scheme.

Also found this SO answer, but it is rather complex, and probably outdated, since it was back in 2013.

解决方案

You can't currently use Guard Malloc and Address Sanitizer together. Selecting the Enable Guard Malloc checkbox disables the Enable Address Sanitizer checkbox. Deselect the Enable Guard Malloc checkbox if you want to use Address Sanitizer.

这篇关于为什么是“启用地址消毒器”在Xcode 7中禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆