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

Disable tracy memory tracking when asan enabled #4340

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,17 @@ tracyEnabled(std::lock_guard<std::mutex> const& _guard)
return TRACY_STATE != TRACY_STOPPED;
}

#ifdef __has_feature
#if __has_feature(address_sanitizer)
#define ASAN_ENABLED
#endif
#else
#ifdef __SANITIZE_ADDRESS__
#define ASAN_ENABLED
#endif
#endif

#ifndef ASAN_ENABLED
void*
operator new(std::size_t count)
{
Expand Down Expand Up @@ -334,7 +345,8 @@ operator delete[](void* ptr) noexcept
}
free(ptr);
}
#endif
#endif // ASAN_ENABLED
#endif // USE_TRACY

int
main(int argc, char* const* argv)
Expand Down
Loading