Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show a compile error if used with ASAN #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

norcalli
Copy link

No description provided.

@mmozeiko
Copy link
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.

None yet

2 participants