Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLT --update-debug-sections causes infinite loop when processing binaries generated with dwarf5 and compressed debug section #109723

Open
yabinc opened this issue Sep 23, 2024 · 2 comments
Labels

Comments

@yabinc
Copy link
Contributor

yabinc commented Sep 23, 2024

The binary is generated with -fdebug-default-version=5 and --compress-debug-sections=zstd.

The reproduce cmdline is: llvm-bolt libart.so -o=libart_bolt.so --data libart.bolt --reorder-blocks=ext-tsp --reorder-functions=cdsort --split-functions --split-strategy=profile2 --update-debug-sections --dyno-stats

The output is:
BOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract strin'g from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_str

The libart.so can be constructed by the following cmds:
unzip libart_part1.zip
unzip libart_part2.zip
unzip libart_part3.zip
dd if=libart.so.part1 of=libart.so bs=28347826 count=1
dd if=libart.so.part2 of=libart.so bs=28347826 count=1 seek=1
dd if=libart.so.part3 of=libart.so bs=56695652 count=1 seek=1`

libart_part1.zip
libart_part2.zip
libart_part3.zip
libart_bolt.zip

@yabinc yabinc added the BOLT label Sep 23, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 23, 2024

@llvm/issue-subscribers-bolt

Author: None (yabinc)

The binary is generated with -fdebug-default-version=5 and --compress-debug-sections=zstd.

The reproduce cmdline is: llvm-bolt libart.so -o=libart_bolt.so --data libart.bolt --reorder-blocks=ext-tsp --reorder-functions=cdsort --split-functions --split-strategy=profile2 --update-debug-sections --dyno-stats

The output is:
BOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract strin'g from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_strBOLT-ERROR: could not extract string from .debug_line_str

The libart.so can be constructed by the following cmds:
unzip libart_part1.zip
unzip libart_part2.zip
unzip libart_part3.zip
dd if=libart.so.part1 of=libart.so bs=28347826 count=1
dd if=libart.so.part2 of=libart.so bs=28347826 count=1 seek=1
dd if=libart.so.part3 of=libart.so bs=56695652 count=1 seek=1`

libart_part1.zip
libart_part2.zip
libart_part3.zip
libart_bolt.zip

@aaupov
Copy link
Contributor

aaupov commented Sep 23, 2024

I don't think BOLT supports compressed debug sections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants