glandium wrote:

I bisected a bustage building clang with PGO on Windows to this change. While 
building clang with a profile-generate-enabled build of clang to gather a 
profile, the compiler crashes with:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and 
include the crash backtrace, preprocessed source, and associated run script.
Exception Code: 0xC0000005
 #0 0x00007ff6786ac4b7 llvm::object::COFFObjectFile::getFeatures(void) const 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x43ac4b7)
 #1 0x00007ff6786ac2c4 llvm::object::COFFObjectFile::getFeatures(void) const 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x43ac2c4)
 #2 0x00007ff675f61b78 llvm::object::isNotObjectErrorInvalidFileType(class 
llvm::Error) (D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x1c61b78)
 #3 0x00007ff675f619cf llvm::object::isNotObjectErrorInvalidFileType(class 
llvm::Error) (D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x1c619cf)
 #4 0x00007ff67b9451d5 clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x76451d5)
 #5 0x00007ff67b9452c1 clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x76452c1)
 #6 0x00007ff67b944f79 clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x7644f79)
 #7 0x00007ff67b942979 clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x7642979)
 #8 0x00007ff67b9429f1 clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x76429f1)
 #9 0x00007ff67b9428e3 clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x76428e3)
#10 0x00007ff67b93227b clang::tooling::parseIWYUPragma(char const *) 
(D:\task_172897772250463\fetches\clang\bin\clang-cl.EXE+0x763227b)
#11 0x00007ffc74784cb0 (C:\Windows\System32\KERNEL32.DLL+0x14cb0)
#12 0x00007ffc7517ecdb (C:\Windows\SYSTEM32\ntdll.dll+0x7ecdb)
```
In the rare case where it doesn't crash, after the successful build, 
`llvm-profdata merge` fails with
```
D:\task_172895232291267\fetches\llvm-project/build/profiles\15750880694198762592_0.profraw:
 
??$_Emplace_reallocate@V?$unique_ptr@VSymbolicFile@object@llvm@@U?$default_delete@VSymbolicFile@object@llvm@@@std@@@std@@@?$vector@V?$unique_ptr@VSymbolicFile@object@llvm@@U?$default_delete@VSymbolicFile@object@llvm@@@std@@@std@@V?$allocator@V?$unique_ptr@VSymbolicFile@object@llvm@@U?$default_delete@VSymbolicFile@object@llvm@@@std@@@std@@@2@@std@@AEAAPEAV?$unique_ptr@VSymbolicFile@object@llvm@@U?$default_delete@VSymbolicFile@object@llvm@@@std@@@1@QEAV21@$$QEAV21@@Z:
 function value site count change detected (counter mismatch)
Make sure that all profile data to be merged is generated from the same binary. 
warning: 
D:\task_172895232291267\fetches\llvm-project/build/profiles\10821587162318259349_0.profraw:
 malformed instrumentation profile data: total size is not multiples of 
quardword
error: no profile can be merged 
```

https://github.com/llvm/llvm-project/pull/111332
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to