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*
837 Discussions

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

Frank_R_1
Nouveau contributeur I
1 446 Visites

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 Compliments
1 Solution
Frank_R_1
Nouveau contributeur I
1 169 Visites

Hi,

 

I can confirm that this now works with Intel oneAPI 2024.2.0, so you can close this issue.

 

Thank you for the fix and best regards

Frank

Voir la solution dans l'envoi d'origine

0 Compliments
3 Réponses
Alex_Y_Intel
Modérateur
1 333 Visites

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

0 Compliments
Frank_R_1
Nouveau contributeur I
1 170 Visites

Hi,

 

I can confirm that this now works with Intel oneAPI 2024.2.0, so you can close this issue.

 

Thank you for the fix and best regards

Frank

0 Compliments
Alex_Y_Intel
Modérateur
1 146 Visites

Yes it is fixed for 2024.2. Thanks for confirming it. 

0 Compliments
Répondre