{"id":36111,"date":"2025-11-17T20:51:21","date_gmt":"2025-11-17T20:51:21","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=36111"},"modified":"2025-11-17T21:12:53","modified_gmt":"2025-11-17T21:12:53","slug":"introducing-msvc-addresssanitizer-for-arm64-targets","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/introducing-msvc-addresssanitizer-for-arm64-targets\/","title":{"rendered":"Introducing MSVC AddressSanitizer for ARM64 targets"},"content":{"rendered":"<p><span data-contrast=\"auto\">We are pleased to announce\u00a0<\/span><b><span data-contrast=\"auto\">AddressSanitizer\u00a0<\/span><\/b><span data-contrast=\"auto\">(ASan) support for the Microsoft C++ (MSVC) Build Tools for\u00a0<\/span><b><span data-contrast=\"auto\">ARM64 targets<\/span><\/b><span data-contrast=\"auto\">.\u00a0ASan is a runtime memory error detector that\u00a0identifies\u00a0difficult-to-find bugs with zero false positives and improves memory safety.\u00a0More technical information on ASan can be found at\u00a0<\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/sanitizers\/asan?view=msvc-170\"><span data-contrast=\"none\">aka.ms\/asan<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">ASan has long supported the x64 and x86 architectures. With the\u00a0<\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/releases\/2026\/release-notes\"><b><span data-contrast=\"none\">release of Visual Studio 2026 for production use<\/span><\/b><\/a><span data-contrast=\"auto\">, this support now extends to\u00a0<\/span><b><span data-contrast=\"auto\">ARM64.\u00a0<\/span><\/b><span data-contrast=\"auto\">The feature is\u00a0currently in preview,\u00a0so there may be build, runtime, or IDE integration issues.\u00a0Cross-compiling for ARM64 targets from x86 or x64 hosts is supported. ARM64EC is not supported.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">To use ASan\u00a0in Visual Studio 2026:<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:360,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h3>\n<ul>\n<li><span data-contrast=\"auto\">From the Visual Studio Installer:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li style=\"list-style-type: none;\">\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"0\" data-aria-level=\"1\"><span data-contrast=\"auto\">Select\u00a0<\/span><b><span data-contrast=\"auto\">MSVC AddressSanitizer<\/span><\/b><span data-contrast=\"auto\">\u00a0under<\/span><b><span data-contrast=\"auto\">\u00a0Desktop development with C++<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">To support cross-compiling projects to ARM64, install M<\/span><b><span data-contrast=\"auto\">SVC Build Tools for ARM64\/ARM64EC<\/span><\/b><span data-contrast=\"auto\">\u00a0<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><span data-ccp-props=\"{&quot;335559685&quot;:2160}\"><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64install.webp\"><img decoding=\"async\" class=\"wp-image-36113 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64install.webp\" alt=\"asanarm64install image\" width=\"455\" height=\"555\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64install.webp 455w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64install-246x300.webp 246w\" sizes=\"(max-width: 455px) 100vw, 455px\" \/><\/a><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">To enable ASan in your C++ project after installation:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"2\"><span data-contrast=\"auto\">Right\u00a0click the solution\u00a0<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"2\"><span data-contrast=\"auto\">Click\u00a0Properties\u00a0<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"2\"><span data-contrast=\"auto\">Click\u00a0C\/C++<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"2\"><span data-contrast=\"auto\">Enable AddressSanitizer &gt;\u00a0<\/span><b><span data-contrast=\"auto\">Yes (\/fsanitize=address)\n<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64property-1.webp\"><img decoding=\"async\" class=\"wp-image-36114 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64property-1.webp\" alt=\"asanarm64property image\" width=\"861\" height=\"470\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64property-1.webp 934w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64property-1-300x164.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/11\/asanarm64property-1-768x419.webp 768w\" sizes=\"(max-width: 861px) 100vw, 861px\" \/><\/a><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">A preview message will display when targeting ARM64 with ASan:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\"><i><span data-contrast=\"none\">ARM64 support for MSVC AddressSanitizer is provided as a preview.<\/span><\/i><span data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:720,&quot;335559738&quot;:160}\">\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\"><i><span data-contrast=\"none\">We&#8217;re\u00a0eager to hear about bugs and suggestions for improvements.<\/span><\/i><span data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:720,&quot;335559738&quot;:160}\">\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\"><i><span data-contrast=\"none\">However, note that this feature is provided as-is without support as\u00a0we&#8217;re\u00a0working towards\u00a0the full\u00a0implementation.<\/span><\/i><span data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:720,&quot;335559738&quot;:160}\">\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\"><i><span data-contrast=\"none\">See:\u00a0<\/span><\/i><a href=\"https:\/\/aka.ms\/asan\"><i><span data-contrast=\"none\">https:\/\/aka.ms\/asan<\/span><\/i><\/a><span data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:720,&quot;335559738&quot;:160}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\"><span class=\"TextRun SCXW58623755 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW58623755 BCX8\">By default, the\u00a0<\/span><\/span><a class=\"Hyperlink SCXW58623755 BCX8\" href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/sanitizers\/asan-debugger-integration?view=msvc-170\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun Underlined SCXW58623755 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW58623755 BCX8\" data-ccp-charstyle=\"Hyperlink\">VCASan<\/span><span class=\"NormalTextRun SCXW58623755 BCX8\" data-ccp-charstyle=\"Hyperlink\">\u00a0<\/span><\/span><span class=\"TextRun Underlined SCXW58623755 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW58623755 BCX8\" data-ccp-charstyle=\"Hyperlink\">library<\/span><span class=\"NormalTextRun SCXW58623755 BCX8\" data-ccp-charstyle=\"Hyperlink\">\u00a0<\/span><span class=\"NormalTextRun SCXW58623755 BCX8\" data-ccp-charstyle=\"Hyperlink\">is also used<\/span><\/span><\/a><span class=\"TextRun SCXW58623755 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW58623755 BCX8\">\u00a0<\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW58623755 BCX8\">to improve<\/span><span class=\"NormalTextRun SCXW58623755 BCX8\">\u00a0the debugging experience<\/span><span class=\"NormalTextRun SCXW58623755 BCX8\"> inside Visual Studio. <\/span><\/span><\/span><\/p>\n<p><span data-contrast=\"auto\">If you\u2019ve built your application on a host architecture other than ARM64, it must be executed on an ARM64 target machine from an ARM64 Visual Studio 2026 Developer Command Prompt or alongside the ASan binary <code>clang_rt.asan_dynamic-aarch64.dll<\/code><\/span><span data-contrast=\"auto\">. Otherwise, the ASan binary must be manually copied from <code>%VSINSTALLDIR%\\VC\\Tools\\MSVC\\&lt;version&gt;\\bin\\Hostarm64\\arm64<\/code> to the same directory of the executable under test.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">We&#8217;d love for you to try it out and provide any feedback you may have! Please report any issues you find via Help &gt; Send Feedback &gt; Report a Problem in Visual Studio.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are pleased to announce\u00a0AddressSanitizer\u00a0(ASan) support for the Microsoft C++ (MSVC) Build Tools for\u00a0ARM64 targets.\u00a0ASan is a runtime memory error detector that\u00a0identifies\u00a0difficult-to-find bugs with zero false positives and improves memory safety.\u00a0More technical information on ASan can be found at\u00a0aka.ms\/asan.\u00a0 ASan has long supported the x64 and x86 architectures. With the\u00a0release of Visual Studio 2026 for [&hellip;]<\/p>\n","protected":false},"author":111147,"featured_media":35800,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3959,270,1],"tags":[3893,140],"class_list":["post-36111","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-addresssanitizer","category-announcement","category-cplusplus","tag-address-sanitizer","tag-c"],"acf":[],"blog_post_summary":"<p>We are pleased to announce\u00a0AddressSanitizer\u00a0(ASan) support for the Microsoft C++ (MSVC) Build Tools for\u00a0ARM64 targets.\u00a0ASan is a runtime memory error detector that\u00a0identifies\u00a0difficult-to-find bugs with zero false positives and improves memory safety.\u00a0More technical information on ASan can be found at\u00a0aka.ms\/asan.\u00a0 ASan has long supported the x64 and x86 architectures. With the\u00a0release of Visual Studio 2026 for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/111147"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=36111"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36111\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35800"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=36111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=36111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=36111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}