https://bugs.llvm.org/show_bug.cgi?id=37349

            Bug ID: 37349
           Summary: clang-cl address sanitizer doesn't work in x64
           Product: compiler-rt
           Version: 6.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Created attachment 20267
  --> https://bugs.llvm.org/attachment.cgi?id=20267&action=edit
error in compiled executable

clang version: 7.0.0-r330570
additional command line options:
-v -fsanitize=address -fsanitize=undefined 

linker options:
/OUT:"E:\projects\ConsoleApplication1\x64\Release\ConsoleApplication1.exe"
/MANIFEST /LTCG:incremental /NXCOMPAT
/PDB:"E:\projects\ConsoleApplication1\x64\Release\ConsoleApplication1.pdb"
/DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib"
"comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib"
"uuid.lib" "odbc32.lib" "odbccp32.lib" "clang_rt.asan-x86_64.lib"
"clang_rt.ubsan_standalone-x86_64.lib" /DEBUG /MACHINE:X64 /OPT:REF
/INCREMENTAL:NO
/PGD:"E:\projects\ConsoleApplication1\x64\Release\ConsoleApplication1.pgd"
/SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/ManifestFile:"x64\Release\ConsoleApplication1.exe.intermediate.manifest"
/OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 

Code used for test:
int main()
{
    HANDLE hLogFile = CreateFile(L"log.txt", GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
    char test[3]={0x90,0x90,0x90};
    int i = INT_MAX; 
    test[2] = i++; 
    test[4] = '1'; 
    system("pause");
    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to