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

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 16:48:57 PST 2023


================
@@ -0,0 +1,51 @@
+//===-- asan_win_thunk_common.h  --------------------------------*- C++ -*-===//
+//
+// 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 common utilities to communicate between static and DLL
+// portions of the ASAN runtime.
+//
+// This file must not include any core components of the ASAN runtime as it must
+// be able to be included in the portions statically linked with the user
+// program.
+//
+//===----------------------------------------------------------------------===//
+
+#pragma once
+#include <sanitizer_common/sanitizer_internal_defs.h>
+namespace __sanitizer {
+
+__declspec(noinline) inline __sanitizer::uptr __asan_GetCurrentPc() {
+  return GET_CALLER_PC();
+}
+
+struct __asan_win_stack_data {
----------------
vitalybuka wrote:

Seems reasonable.

Still this patch seperate TUs, so if you can focus only on this here, it would be nice, and anything else in other patches.

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


More information about the llvm-commits mailing list