Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
603 Discussions

Windows debug build with icx and address sanitizer crash with dynamic runtime

Frank_R_1
Beginner
203 Views

Hi,

 

consider the reproducer:

///////////////////////////////////////////////////////////////////////////////////////////////////////

// Windows 10 Enterprise
//
// Microsoft Visual Studio Professional 2019
// Version 16.11.16
//
// Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240308
// Copyright (C) 1985-2024 Intel Corporation. All rights reserved.
//
// icx failes with error: cannot make section .ASAN$GL associative with sectionless symbol ?id@?$numpunct@D@std@@2V0locale@2@A
// icx -Od -Ob0 -MD -fsanitize=address,float-divide-by-zero -fsanitize-address-use-after-scope test.cxx
// ok
// icx -Od -Ob0 -fsanitize=address,float-divide-by-zero -fsanitize-address-use-after-scope test.cxx
#include <locale>
int main() {
std::use_facet<std::numpunct<char>>(std::locale());
return 0;
}

Also consider:

https://github.com/llvm/llvm-project/issues/47294

 

Is there a chance that in future this error will be fixed?

So on Windows it is not possible to use address sanitizer with -MD option (runtime as dll not as static lib)

 

Best regards

Frank

0 Kudos
1 Reply
Alex_Y_Intel
Moderator
90 Views

I escalated your issue to our engineering team and will update when we reach a conclusion. 

0 Kudos
Reply