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

[ASan][libc++] Update string ASan annotations to zero-overhead #76165

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,16 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
# endif

// ASan related macros
// _LIBCPP_IF_ASAN is used to removed ASan related code, whenever compiled without ASan.
AdvenamTacet marked this conversation as resolved.
Show resolved Hide resolved
#ifndef _LIBCPP_IF_ASAN
# ifndef _LIBCPP_HAS_NO_ASAN
# define _LIBCPP_IF_ASAN() if _LIBCPP_CONSTEXPR (true)
# else
# define _LIBCPP_IF_ASAN() if _LIBCPP_CONSTEXPR (false)
# endif
#endif
AdvenamTacet marked this conversation as resolved.
Show resolved Hide resolved

#endif // __cplusplus

#endif // _LIBCPP___CONFIG