[compiler-rt] [asan][win][msvc] override new and delete and seperate TUs (PR #68754)

Charlie Barto via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 10:29:24 PST 2023


================
@@ -0,0 +1,34 @@
+//===-- asan_win_new_scalar_align_nothrow_thunk.cc ------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+// Windows-specific user-provided new/delete operator detection and fallback.
+//===----------------------------------------------------------------------===//
+#include "asan_win_new_delete_thunk_common.h"
+
+// see diagram in asan_win_new_delete_thunk_common.h for the ordering of the
+// new/delete fallbacks.
+
+extern "C" void* __cdecl __asan_new_align_nothrow(size_t size,
----------------
barcharcraz wrote:

Just because each individual TU is their only callsite, so there's no need to have all of their declarations in a header. If someone needs to call them from someplace else they can move them then.

If you feel strongly about it I can move them though. I thought you just wanted the big diagrams centralized.

https://github.com/llvm/llvm-project/pull/68754


More information about the llvm-commits mailing list