Skip to content

Show a compile error if used with ASAN#83

Open
norcalli wants to merge 1 commit intocmuratori:masterfrom
norcalli:master
Open

Show a compile error if used with ASAN#83
norcalli wants to merge 1 commit intocmuratori:masterfrom
norcalli:master

Conversation

@norcalli
Copy link
Copy Markdown

No description provided.

@mmozeiko
Copy link
Copy Markdown
Contributor

mmozeiko commented Aug 19, 2021

This #if does not compile in MSVC: fatal error C1012: unmatched parenthesis: missing ')'
I think it does not like __has_feature which expands to nothing, so && ) is syntax error.
People typically do

#ifndef __has_feature
#   define __has_feature(x) 0
#endif

before using __has_feature across compilers.

Imho it is better to disable address sanitizer on function. Otherwise this will prevent users using meow hash in their project at all if they want to use asan.
Do disable asan on function you use __attribute__((no_sanitize_address)) for gcc/clang or __declspec(no_sanitize_address) for MSVC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants