# How to use address sanitizer on Windows in UE5.5 Project?

**URL:** <https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-windows-in-ue5-5-project/2495040>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, crash, question, CPP\
**Created:** [May 7, 2025, 8:04am UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-windows-in-ue5-5-project/2495040 "2025-05-07T08:04:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HlG4399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HlG4399](https://forums.unrealengine.com/u/HlG4399)\
**Post date:** [May 7, 2025, 8:04am UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-windows-in-ue5-5-project/2495040/1 "2025-05-07T08:04:40Z")

</div>

Hello, I want to detects memory corruption bugs in my UE5.5 project’s c++ code on Windows.

```auto
[XmlConfigFile(Category = "BuildConfiguration", Name = "bEnableAddressSanitizer")]
[CommandLine("-EnableASan")]
public bool bEnableAddressSanitizer = true;

```

I modified above code to enable asan. But after compilation, crash on the initialization of a class static member variable, FPreAnimatedWidgetMaterialSwitcherStorage::StorageID.

 ![1746600916490](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/4/0f4e246570f8c0fa32095859f8c27c3e25137735.png)

Could anyone tell me how to use address sanitizer? Or another tools?

---

<div class="post-metadata">

**Author:** ![JiaWei2244](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JiaWei2244](https://forums.unrealengine.com/u/JiaWei2244)\
**Post date:** [December 25, 2025, 2:16pm UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-windows-in-ue5-5-project/2495040/2 "2025-12-25T14:16:11Z")

</div>

the same for me

---

<div class="post-metadata">

**Author:** ![Wataru.5986](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wataru.5986](https://forums.unrealengine.com/u/Wataru.5986)\
**Post date:** [January 11, 2026, 2:07pm UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-windows-in-ue5-5-project/2495040/3 "2026-01-11T14:07:47Z")

</div>

The same issue occurred in the editor, but the game build performed as expected.

---

<div class="post-metadata">

**Author:** ![luxuan19811981](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@luxuan19811981](https://forums.unrealengine.com/u/luxuan19811981)\
**Post date:** [February 10, 2026, 3:51am UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-windows-in-ue5-5-project/2495040/4 "2026-02-10T03:51:25Z")

</div>

I read a post from Chris Erickson on building Editor ASAN (haven’t tried myself yet):

1. Use monolithic build (modular builds seems to crash due to cyclic dependencies)
2. Use Clang as compiler
3. Reduce the final binary size  
a. -fsanitize-address-outline-instrumentation  
b. optimize for size

Which makes sense to me.
