[llvm] [BOLT][AArch64] Support for pointer authentication (v2) (PR #120064)
jiangtao zhao via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 00:46:25 PST 2025
whousemyname wrote:
Hello bgergely0, This PR is really great!!
But when I used this PR, I instrumented my lib.so (aarch64) file, but the bolt crashed. It was related to the hash of the relocation information. I don’t know if it was because of the duplication of my lib.so file. Is it related to positioning information or PR?
The command executed is ` llvm-bolt.exe libGG.debug.so -instrument --instrumentation-file=GG.fdata -o .\libGG-debug.so.instrumented`
```
BOLT-INFO: shared object or position-independent executable detected
BOLT-INFO: Target architecture: aarch64
BOLT-INFO: BOLT version: dac8f161e868f57e34c5a12bc81c939a64322d15
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: creating new program header table at address 0x4000000, offset 0x4000000
BOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.
BOLT-INFO: enabling relocation mode
BOLT-INFO: forcing -jump-tables=move for instrumentation
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: D:\\github-projects\\llvm-project\\build-forbolt\\bin\\llvm-bolt.exe D:\\projects\\apks\\v102\\forbolt-unity-relocs-1\\Output2\\libGameCore.debug.so -instrument --instrumentation-file=baldwinzhao_unity.fdata -o .\\libunity-debug.so.instrumented
Exception Code: 0x80000003
#0 0x00007ff7dee0b653 std::_Tree_const_iterator<class std::_Tree_val<struct std::_Tree_simple_types<struct llvm::bolt::Relocation>>>::operator*(void) const C:\install_vs_buildtools\VC\Tools\MSVC\14.42.34433\include\xtree:182:0
#1 0x00007ff7dff570f4 std::_Tree_const_iterator<class std::_Tree_val<struct std::_Tree_simple_types<struct llvm::bolt::Relocation>>>::operator->(void) const C:\install_vs_buildtools\VC\Tools\MSVC\14.42.34433\include\xtree:189:0
#2 0x00007ff7dff5134c llvm::bolt::BinarySection::hash(class llvm::bolt::BinaryData const &, class std::map<class llvm::bolt::BinaryData const *, unsigned __int64, struct std::less<class llvm::bolt::BinaryData const *>, class std::allocator<struct std::pair<class llvm::bolt::BinaryData const *const, unsigned __int64>>> &) const D:\github-projects\llvm-project\bolt\lib\Core\BinarySection.cpp:58:0
#3 0x00007ff7dffc4bf4 llvm::bolt::BinarySection::hash(class llvm::bolt::BinaryData const &) const D:\github-projects\llvm-project\bolt\include\bolt\Core\BinarySection.h:429:0
#4 0x00007ff7dff64c47 llvm::bolt::BinaryContext::generateSymbolHashes(void) D:\github-projects\llvm-project\bolt\lib\Core\BinaryContext.cpp:1186:0
#5 0x00007ff7dff6d11a llvm::bolt::BinaryContext::postProcessSymbolTable(void) D:\github-projects\llvm-project\bolt\lib\Core\BinaryContext.cpp:1414:0
#6 0x00007ff7ded4a796 llvm::bolt::RewriteInstance::buildFunctionsCFG(void) D:\github-projects\llvm-project\bolt\lib\Rewrite\RewriteInstance.cpp:3431:0
#7 0x00007ff7ded3936e llvm::bolt::RewriteInstance::run(void) D:\github-projects\llvm-project\bolt\lib\Rewrite\RewriteInstance.cpp:688:0
#8 0x00007ff7dd07eb8b main D:\github-projects\llvm-project\bolt\tools\driver\llvm-bolt.cpp:268:0
#9 0x00007ff7e27221c9 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#10 0x00007ff7e27220b2 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#11 0x00007ff7e2721f6e __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#12 0x00007ff7e272225e mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#13 0x00007ffac8cd259d (C:\WINDOWS\System32\KERNEL32.DLL+0x1259d)
#14 0x00007ffaca30af38 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x5af38)
```
https://github.com/llvm/llvm-project/pull/120064
More information about the llvm-commits
mailing list