Comments (14)
I would suggest you check if the issue reproduces with the trunk version of BOLT first. AFAIK DWARF5 support was added to BOLT after LLVM14 release and it wasn't backported.
from bolt.
Hi @zpget,
Thanks for reporting! Can you please also include full backtrace and the version of BOLT used?
It would also be helpful for us to be able to repro the build - if clang14 binary is built manually, what's the CMake command line? If it's distro built, which package is it?
@ayermolo - does that look familiar? Can that be the cause of the crash?
BOLT-WARNING: Unsupported DWARFLocationEntry Kind:5
from bolt.
Hi @zpget,
Thanks for reporting! Can you please also include full backtrace and the version of BOLT used? It would also be helpful for us to be able to repro the build - if clang14 binary is built manually, what's the CMake command line? If it's distro built, which package is it?
@ayermolo - does that look familiar? Can that be the cause of the crash?
BOLT-WARNING: Unsupported DWARFLocationEntry Kind:5
- bolt version: llvm-project-llvmorg-14.0.0 release
- core line:
bolt/lib/Rewrite/DWARFRewriter.cpp
switch (Entry.Kind) {
default:
llvm_unreachable("Unsupported DWARFLocationEntry Kind.");
Kind:5
- binary code is complex , main module depend on many other modules(static link)
from bolt.
Hi
I am currently on PTO so won't be able to look until next week, but does sound like you are using BOLT version that doesn't support DWARF5. Please try with trunk as Amir suggested.
from bolt.
BOLT version:
BOLT-INFO: BOLT version: 56ff67c
with latest trunk, still has core
switch (Entry.Kind) {
default:
errs() << "BOLT-WARNING: Unsupported DWARFLocationEntry Kind. type="
<< std::to_string(Entry.Kind) << '\n';
llvm_unreachable("Unsupported DWARFLocationEntry Kind.");
i add log
errs() << "BOLT-WARNING: Unsupported DWARFLocationEntry Kind. type="
<< std::to_string(Entry.Kind) << '\n';
and coredump before get:
BOLT-WARNING: Unsupported DWARFLocationEntry Kind. type=5
before coredump print so many warnings:
BOLT-WARNING: empty location list detected at 0x6dd5 for DIE at 0x1779b0 in CU at 0x215b0
BOLT-WARNING: unexpected low_pc form value. Cannot update DIE at offset 0x1779c2
BOLT-WARNING: empty location list detected at 0x6dd7 for DIE at 0x1779d2 in CU at 0x215b0
BOLT-WARNING: unexpected low_pc form value. Cannot update DIE at offset 0x1779db
BOLT-WARNING: unexpected low_pc form value. Cannot update DIE at offset 0x1779ff
BOLT-WARNING: unexpected low_pc form value. Cannot update DIE at offset 0x177a23
from bolt.
clang build with -gdwarf-4 -gstrict-dwarf ,
BOLT-WARNING: Unsupported DWARFLocationEntry Kind. type=8
add
@@ -516,6 +518,12 @@ void DWARFRewriter::updateUnitDebugInfo(
BaseAddress + Entry.Value0, BaseAddress + Entry.Value1,
Entry.Loc});
break;
-
case dwarf::DW_LLE_start_length:
-
InputLL.emplace_back(DebugLocationEntry{
-
Entry.Value0, Entry.Value0 + Entry.Value1,
-
Entry.Loc});
-
break;
can success ,
but has warning
BOLT-WARNING: empty location list detected at 0x6dd8 for DIE at 0x177aa4 in CU at 0x215b0
and
gdb load bin has no debug info warning
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from test.bolt...
DW_FORM_strp pointing outside of .debug_str section [in module /home/work/test.bolt]
(No debugging symbols found in test.bolt)
so something wrong with debuginfo update?
from bolt.
BOLT version: BOLT-INFO: BOLT version: 56ff67c with latest trunk, still has core
You're using non-upstreamed BOLT version which was last updated in Jan this year.
BOLT has been part of LLVM monorepo since then: https://github.com/llvm/llvm-project/tree/main/bolt
Please follow the instructions on that page (https://github.com/llvm/llvm-project/tree/main/bolt#manual-build) to check out and build the latest trunk version.
from bolt.
ok, now can fix coredump ,but get some ERROR:
BOLT-ERROR: unsupported form for DW_AT_call_return_pc
from bolt.
Hmm. Are you sure you are on latest llvm trunk? I am pretty sure I fixed that and committed it.
from bolt.
with this commit: 4f158995b9cddae392bfb5989af8c83101ae0789
llvm/llvm-project@4f15899
today i see have a latest commit? 4d3a0cade2ed0bdc87256c197215691c2e279ed0
i need try again?
from bolt.
I added support in https://reviews.llvm.org/D128526
Maybe I missed a case. Can you provide a binary and/or how it was build?
from bolt.
compiler: llvm-project-14.0.5.src/clang f68d4e64a17b5699e0245b1a7c445830d38fd75f
demo: simple main demo
#include
#include <stdio.h>
#include
#include <unistd.h>
int LOOPS=1000;
void test() {
for (int i = 0; i < LOOPS; i++ ) {
std::string tmp = "hello" + std::to_string(i);
std::cout << tmp << std::endl;
}
}
int main() {
while (true) {
test();
sleep(5);
}
return 0;
}
compile cmd: clang-14/bin/clang++ main.cpp -std=c++11 -Wl,-q
demo bin:
a.out.zip
errmsg:
BOLT-INFO: padding code to 0xa00000 to accommodate hot text
BOLT-ERROR: unsupported form for DW_AT_call_return_pc Function:__libc_csu_init
for DIE.dump()
0x00000696: DW_TAG_call_site
DW_AT_call_return_pc (0x00000000004016dc)
from bolt.
Debug Info in question comes from GCC compiled code.
https://reviews.llvm.org/D136204
from bolt.
Debug Info in question comes from GCC compiled code. https://reviews.llvm.org/D136204
ok, test can work, thanks~
from bolt.
Related Issues (20)
- A dump about function cannot be properly disassembled when use -use-old-text HOT 2
- perf2bolt: crashes with assertion. HOT 5
- A NullPtrException after BOLT on libart.so HOT 2
- BOLT/LLVM? does not preserve prefixes on conditional branches HOT 2
- Assert error in resolveAArch64Relocation HOT 15
- ELF32 support HOT 1
- BOLT only failed with --hugify HOT 13
- Why skip-function when it jump to itself? HOT 7
- Why Is registerName Executed Twice for a Symbol? HOT 1
- How do I run BOLT on a benchmark of HHVM? HOT 1
- A Problem About .got Table Updates HOT 4
- Promote BOLT to the chromium team HOT 11
- A Problem about IsSimple be used in disassemble
- Any ideas to support riscv architecture? HOT 5
- A fatal error about -update-debug-sections HOT 3
- Any suggest to couple two functions? HOT 11
- How to use --hugify option? HOT 20
- Failed to BOLT HOT 2
- [C++] Exceptions catch leads to Segmentation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolt.