[Webkit-unassigned] [Bug 148623] New: Implement bmalloc::isASanEnabled for Clang and generic Unix
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Aug 30 16:30:09 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=148623
Bug ID: 148623
Summary: Implement bmalloc::isASanEnabled for Clang and generic
Unix
Classification: Unclassified
Product: WebKit
Version: Other
Hardware: All
OS: All
Status: NEW
Severity: Enhancement
Priority: P2
Component: Web Template Framework
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at igalia.com
If you only care about Clang (not sure), bmalloc::isASanEnabled could be as simple as:
static bool isASanEnabled()
{
#if defined(__has_feature) && __has_feature(address_sanitizer)
return true;
#else
return false;
#endif
}
Unless there is some reason I don't understand for the runtime check.
GCC supports asan but not __has_feature. This runtime check works:
void *handle = dlopen(nullptr, RTLD_NOW);
if (!handle)
return false;
bool result = !!dlsym(handle, "__asan_poison_memory_region");
dlclose(handle);
return result;
I expect that would work fine on Darwin too.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150830/73cfb267/attachment.html>
More information about the webkit-unassigned
mailing list