<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic icx with enabled address sanitizer under Windows and C++ throw crash in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1595616#M3709</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider the following reproducer:&lt;/P&gt;&lt;P&gt;//////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;// icx.exe -O3 -Ob2 -Zi -EHsc -MD -fsanitize=address test.cxx&lt;/P&gt;&lt;P&gt;// ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0,halt_on_error=0,detect_stack_use_after_return=true,check_initialization_order=true,check_malloc_usable_size=0,detect_odr_violation=1,handle_segv=1&lt;BR /&gt;#include &amp;lt;cstdio&amp;gt;&lt;BR /&gt;#include &amp;lt;exception&amp;gt;&lt;/P&gt;&lt;P&gt;int main(){&lt;BR /&gt;try {&lt;BR /&gt;throw std::exception("test");&lt;BR /&gt;}catch (const std::exception&amp;amp; ex){&lt;BR /&gt;puts(ex.what());&lt;BR /&gt;}&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Program will terminate with:&lt;/P&gt;&lt;P&gt;&amp;gt;./test.exe&lt;BR /&gt;=================================================================&lt;BR /&gt;==13688==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x7ff791b212a7 bp 0x0056ce4ffb20 sp 0x0056ce4fd260 T0)&lt;BR /&gt;==13688==The signal is caused by a READ memory access.&lt;BR /&gt;==13688==Hint: address points to the zero page.&lt;BR /&gt;#0 0x7ff791b212a6 in main D:\tmp\exception\test.cxx:9&lt;BR /&gt;#1 0x7ffb6463105f (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x18000105f)&lt;BR /&gt;#2 0x7ffb64634d37 (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x180004d37)&lt;BR /&gt;#3 0x7ffb6cd11715 (C:\Windows\SYSTEM32\ntdll.dll+0x1800a1715)&lt;BR /&gt;#4 0x7ff791b211af in main D:\tmp\exception\test.cxx:7&lt;BR /&gt;#5 0x7ff791b21c7f in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78&lt;BR /&gt;#6 0x7ff791b21c7f in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288&lt;BR /&gt;#7 0x7ffb6b4b7343 (C:\Windows\System32\KERNEL32.DLL+0x180017343)&lt;BR /&gt;#8 0x7ffb6ccc26b0 (C:\Windows\SYSTEM32\ntdll.dll+0x1800526b0)&lt;/P&gt;&lt;P&gt;AddressSanitizer can not provide additional info.&lt;BR /&gt;SUMMARY: AddressSanitizer: access-violation D:\tmp\exception\test.cxx:9 in main&lt;BR /&gt;==13688==ABORTING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/google/sanitizers/issues/749" target="_blank"&gt;https://github.com/google/sanitizers/issues/749&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So address sanitizer is not useable under Windows in C++ programs with throw instructions.&lt;/P&gt;&lt;P&gt;Is there a workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2024 12:35:50 GMT</pubDate>
    <dc:creator>Frank_R_1</dc:creator>
    <dc:date>2024-05-07T12:35:50Z</dc:date>
    <item>
      <title>icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1595616#M3709</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider the following reproducer:&lt;/P&gt;&lt;P&gt;//////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;// icx.exe -O3 -Ob2 -Zi -EHsc -MD -fsanitize=address test.cxx&lt;/P&gt;&lt;P&gt;// ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0,halt_on_error=0,detect_stack_use_after_return=true,check_initialization_order=true,check_malloc_usable_size=0,detect_odr_violation=1,handle_segv=1&lt;BR /&gt;#include &amp;lt;cstdio&amp;gt;&lt;BR /&gt;#include &amp;lt;exception&amp;gt;&lt;/P&gt;&lt;P&gt;int main(){&lt;BR /&gt;try {&lt;BR /&gt;throw std::exception("test");&lt;BR /&gt;}catch (const std::exception&amp;amp; ex){&lt;BR /&gt;puts(ex.what());&lt;BR /&gt;}&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Program will terminate with:&lt;/P&gt;&lt;P&gt;&amp;gt;./test.exe&lt;BR /&gt;=================================================================&lt;BR /&gt;==13688==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x7ff791b212a7 bp 0x0056ce4ffb20 sp 0x0056ce4fd260 T0)&lt;BR /&gt;==13688==The signal is caused by a READ memory access.&lt;BR /&gt;==13688==Hint: address points to the zero page.&lt;BR /&gt;#0 0x7ff791b212a6 in main D:\tmp\exception\test.cxx:9&lt;BR /&gt;#1 0x7ffb6463105f (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x18000105f)&lt;BR /&gt;#2 0x7ffb64634d37 (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x180004d37)&lt;BR /&gt;#3 0x7ffb6cd11715 (C:\Windows\SYSTEM32\ntdll.dll+0x1800a1715)&lt;BR /&gt;#4 0x7ff791b211af in main D:\tmp\exception\test.cxx:7&lt;BR /&gt;#5 0x7ff791b21c7f in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78&lt;BR /&gt;#6 0x7ff791b21c7f in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288&lt;BR /&gt;#7 0x7ffb6b4b7343 (C:\Windows\System32\KERNEL32.DLL+0x180017343)&lt;BR /&gt;#8 0x7ffb6ccc26b0 (C:\Windows\SYSTEM32\ntdll.dll+0x1800526b0)&lt;/P&gt;&lt;P&gt;AddressSanitizer can not provide additional info.&lt;BR /&gt;SUMMARY: AddressSanitizer: access-violation D:\tmp\exception\test.cxx:9 in main&lt;BR /&gt;==13688==ABORTING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/google/sanitizers/issues/749" target="_blank"&gt;https://github.com/google/sanitizers/issues/749&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So address sanitizer is not useable under Windows in C++ programs with throw instructions.&lt;/P&gt;&lt;P&gt;Is there a workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 12:35:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1595616#M3709</guid>
      <dc:creator>Frank_R_1</dc:creator>
      <dc:date>2024-05-07T12:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1596660#M3727</link>
      <description>&lt;P&gt;Do you meant that if you compiled like this:&amp;nbsp;icx -O3 -Ob2 -Zi -EHsc -fsanitize=address test.cxx&lt;BR /&gt;You'd get the error you mentioned?&lt;/P&gt;
&lt;P&gt;=================================================================&lt;BR /&gt;==19888==ERROR: AddressSanitizer: access-violation on unknown address 0x7ff60000000b (pc 0x7ff6982912a7 bp 0x00f008aff9c0 sp 0x00f008afd5e0 T0)&lt;BR /&gt;==19888==The signal is caused by a READ memory access.&lt;BR /&gt;#0 0x7ff6982912a6 in main C:\Users\ayu1\Project12\test.cxx:8&lt;BR /&gt;#1 0x7ff6982f453f in _CallSettingFrame D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm:49&lt;BR /&gt;#2 0x7ff6982e995b in __FrameHandler3::CxxCallCatchBlock(struct _EXCEPTION_RECORD *) D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp:1567&lt;BR /&gt;#3 0x7ffd5fbf4245 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x1800a4245)&lt;BR /&gt;#4 0x7ff6982911af in main C:\Users\ayu1\Project12\test.cxx:6&lt;BR /&gt;#5 0x7ff6982e46eb in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78&lt;BR /&gt;#6 0x7ff6982e46eb in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288&lt;BR /&gt;#7 0x7ffd5e98257c (C:\WINDOWS\System32\KERNEL32.DLL+0x18001257c)&lt;BR /&gt;#8 0x7ffd5fbaaa47 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18005aa47)&lt;/P&gt;
&lt;P&gt;AddressSanitizer can not provide additional info.&lt;BR /&gt;SUMMARY: AddressSanitizer: access-violation C:\Users\ayu1\Project12\test.cxx:8 in main&lt;BR /&gt;==19888==ABORTING&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;If I compiled like what you said&amp;nbsp;icx -O3 -Ob2 -Zi -EHsc -MD -fsanitize=address test.cxx (with that -MD)&lt;BR /&gt;I actually got another error saying "the procedure entry point ??3@YAXPEAX@Z could not be located in the dynamic link library", which is the same problem you asked a few days ago:&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Windows-debug-build-with-icx-and-address-sanitizer-crash-with/m-p/1592947#M3683" target="_blank"&gt;https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Windows-debug-build-with-icx-and-address-sanitizer-crash-with/m-p/1592947#M3683&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 09:05:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1596660#M3727</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2024-05-10T09:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1597176#M3732</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to copy&lt;/P&gt;&lt;P&gt;clang_rt.asan_dynamic-x86_64.dll&lt;/P&gt;&lt;P&gt;into&amp;nbsp; your folder where the executable is located!&lt;/P&gt;&lt;P&gt;Then type&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;set ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0,halt_on_error=0,detect_stack_use_after_return=true,check_initialization_order=true,check_malloc_usable_size=0,detect_odr_violation=1,handle_segv=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;in your cmd.exe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;and run&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;.\test.exe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=================================================================&lt;BR /&gt;==24444==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x7ff614ff12a7 bp 0x0006600ff8c0 sp 0x0006600fd000 T0)&lt;BR /&gt;==24444==The signal is caused by a READ memory access.&lt;BR /&gt;==24444==Hint: address points to the zero page.&lt;BR /&gt;#0 0x7ff614ff12a6 in main D:\tmp\test.cxx:11&lt;BR /&gt;#1 0x7ffb6463105f (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x18000105f)&lt;BR /&gt;#2 0x7ffb64634d37 (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x180004d37)&lt;BR /&gt;#3 0x7ffb6cd11715 (C:\Windows\SYSTEM32\ntdll.dll+0x1800a1715)&lt;BR /&gt;#4 0x7ff614ff11af in main D:\tmp\test.cxx:9&lt;BR /&gt;#5 0x7ff614ff1c7f in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288&lt;BR /&gt;#6 0x7ffb6b4b7343 (C:\Windows\System32\KERNEL32.DLL+0x180017343)&lt;BR /&gt;#7 0x7ffb6ccc26b0 (C:\Windows\SYSTEM32\ntdll.dll+0x1800526b0)&lt;/P&gt;&lt;P&gt;AddressSanitizer can not provide additional info.&lt;BR /&gt;SUMMARY: AddressSanitizer: access-violation D:\tmp\test.cxx:11 in main&lt;BR /&gt;==24444==ABORTING&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 08:33:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1597176#M3732</guid>
      <dc:creator>Frank_R_1</dc:creator>
      <dc:date>2024-05-13T08:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1597586#M3734</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just as an information:&lt;/P&gt;&lt;P&gt;On Linux everything works!&lt;/P&gt;&lt;P&gt;We have a lot of unit/integration/regression-tests which ran on Linux but fail on Windows due to exception handling problem of sanitizer : (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 14:52:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1597586#M3734</guid>
      <dc:creator>Frank_R_1</dc:creator>
      <dc:date>2024-05-14T14:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1597623#M3735</link>
      <description>&lt;P&gt;I've escalated your issue to our internal engineering team. We'll come back with the update when we reach the conclusion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 17:39:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1597623#M3735</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2024-05-14T17:39:42Z</dc:date>
    </item>
    <item>
      <title>Re:icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1602812#M3814</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;This compilation error has been resolved and the fix can be expected in the upcoming compiler release. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 31 May 2024 16:33:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1602812#M3814</guid>
      <dc:creator>Sravani_K_Intel</dc:creator>
      <dc:date>2024-05-31T16:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re:icx with enabled address sanitizer under Windows and C++ throw crash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1614289#M3941</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately in Intel oneAPI 2024.2 with Windows 10/VS 2019 the reproducer below does not work!&lt;/P&gt;&lt;P&gt;#############################################################&lt;/P&gt;&lt;P&gt;//icx -Od -EHsc -Z7 ex.cxx&lt;BR /&gt;//works with output "Caught error no. 5 exception at ex.cxx in line 15"&lt;/P&gt;&lt;P&gt;//icx -Od -fsanitize=address -EHsc -Z7 ex.cxx&lt;BR /&gt;//crashes with "Caught error no. Segmentation fault"&lt;BR /&gt;#include&amp;lt;iostream&amp;gt;&lt;BR /&gt;struct Error {&lt;BR /&gt;int a;&lt;BR /&gt;};&lt;BR /&gt;void info(const char* f, const int l, const Error&amp;amp; e) {&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "Caught error no. " &amp;lt;&amp;lt; e.a &amp;lt;&amp;lt; " exception at " &amp;lt;&amp;lt; f &amp;lt;&amp;lt; " in line " &amp;lt;&amp;lt; l &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;}&lt;BR /&gt;int main() {&lt;BR /&gt;try {&lt;BR /&gt;throw Error{5};&lt;BR /&gt;} catch (Error &amp;amp;e) {&lt;BR /&gt;info(__FILE__, __LINE__, e);&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#############################################################&lt;/P&gt;&lt;P&gt;Everything on Linux now works very nice and stable, the exact same code base on Windows crashes in the exceptions catch. (Have a look in the debugger)&lt;/P&gt;&lt;P&gt;ASAN_OPTIONS are:&lt;BR /&gt;alloc_dealloc_mismatch=0,detect_leaks=0,halt_on_error=0,detect_stack_use_after_return=true,check_initialization_order=true,strict_string_checks=true,check_malloc_usable_size=true,detect_odr_violation=1,strict_init_order=1,use_odr_indicator=1,handle_segv=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 18:30:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icx-with-enabled-address-sanitizer-under-Windows-and-C-throw/m-p/1614289#M3941</guid>
      <dc:creator>Frank_R_1</dc:creator>
      <dc:date>2024-07-11T18:30:36Z</dc:date>
    </item>
  </channel>
</rss>

