[all-commits] [llvm/llvm-project] c17200: [ASan][Windows] Fixing Windows shadow memory addre...

Zack Johnson via All-commits all-commits at lists.llvm.org
Fri Mar 6 12:57:58 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c17200033d057aa490fe5b68bb0c9d10cd9d67c9
      https://github.com/llvm/llvm-project/commit/c17200033d057aa490fe5b68bb0c9d10cd9d67c9
  Author: Zack Johnson <zacklj89 at gmail.com>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    M llvm/test/Instrumentation/AddressSanitizer/basic-msvc64.ll

  Log Message:
  -----------
  [ASan][Windows] Fixing Windows shadow memory address for arm64 (#184902)

This is a prerequisite for full ARM64 Windows ASan support. The runtime
interception changes needed to make ASan functional end-to-end on ARM64
Windows will be opened separately.

Motivated by https://github.com/microsoft/STL/pull/6095 (more
specifically [this reference to
clang-cl](https://github.com/microsoft/STL/pull/6095#:~:text=Not%20enabling%20GH_002030_asan_annotate_string%20and%20GH_002030_asan_annotate_vector%20yet%20due%20to%20Clang%20issues.))

The latest MSVC toolset includes ARM64 AddressSanitizer support. This
change adds AArch64 to the Windows 64-bit shadow mapping condition when
compiling with `-fsanitize=address` with `clang-cl`. Without this,
consumers on Windows who target ARM64 with `clang-cl -fsanitize=address`
and then link with `link.exe` will see this at runtime:

```text
ERROR: AddressSanitizer: access-violation on unknown address
...
```

since the shadow memory offset is not properly assigned. Windows ARM64
uses the same dynamic shadow allocation strategy as x64 via
`__asan_shadow_memory_dynamic_address`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list