]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/config/allocator/malloc_allocator_base.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / config / allocator / malloc_allocator_base.h
index ef6abb777436e9ada32f3006482cfc2782666a4c..9a17f612fd3c9c727d284a7eafdfd037db91f4ba 100644 (file)
@@ -1,6 +1,6 @@
 // Base to std::allocator -*- C++ -*-
 
-// Copyright (C) 2004, 2005, 2009, 2010, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2004-2023 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -52,4 +52,14 @@ namespace std
 # define __allocator_base  __gnu_cxx::malloc_allocator
 #endif
 
+#ifndef _GLIBCXX_SANITIZE_STD_ALLOCATOR
+# if defined(__SANITIZE_ADDRESS__)
+#  define _GLIBCXX_SANITIZE_STD_ALLOCATOR 1
+# elif defined __has_feature
+#  if __has_feature(address_sanitizer)
+#   define _GLIBCXX_SANITIZE_STD_ALLOCATOR 1
+#  endif
+# endif
+#endif
+
 #endif