Skip to content

[BOLT] Optimized binary has premature terminator entry warning #89508

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

Open
Zentrik opened this issue Apr 20, 2024 · 5 comments
Open

[BOLT] Optimized binary has premature terminator entry warning #89508

Zentrik opened this issue Apr 20, 2024 · 5 comments
Assignees
Labels

Comments

@Zentrik
Copy link
Contributor

Zentrik commented Apr 20, 2024

Optimizing this binary with -split-functions -update-debug-sections -split-strategy=cdsplit and this profile causes the following warnings to show up:

$ llvm-dwarfdump --debug-aranges libjulia-internal.so >/dev/null
warning: address range table at offset 0x0 has a premature terminator entry at offset 0x10
warning: address range table at offset 0x0 has a premature terminator entry at offset 0x20
warning: address range table at offset 0x0 has a premature terminator entry at offset 0x30
warning: address range table at offset 0xb20 has a premature terminator entry at offset 0xb30
warning: address range table at offset 0xb20 has a premature terminator entry at offset 0xb40
warning: address range table at offset 0xb20 has a premature terminator entry at offset 0xb50
...
warning: address range table at offset 0x12af0 has a premature terminator entry at offset 0x12f00
warning: address range table at offset 0x13aa0 has a premature terminator entry at offset 0x13d50

I tested on 0dcabba and 18.1.4 (e6c3289).
Also adding -skip-funcs=.\*apply_cl.\* as discussed in #89117 didn't help.

@maksfb
Copy link
Contributor

maksfb commented Apr 22, 2024

@ayermolo, any idea why the warnings are there?

@ayermolo
Copy link
Contributor

@ayermolo, any idea why the warnings are there?

probably because we don't filter 0x0 addresses and that is what is used for aranges to indicate end of aranges entries.

@maksfb
Copy link
Contributor

maksfb commented Apr 22, 2024

@ayermolo, any idea why the warnings are there?

probably because we don't filter 0x0 addresses and that is what is used for aranges to indicate end of aranges entries.

Do we need a fix on BOLT or llvm-dwarf side for them to go away?

@Zentrik
Copy link
Contributor Author

Zentrik commented Apr 22, 2024

Seems intentional on llvm-dwarf's side, https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200810/816972.html. They also claim 'the DWARF specification states that .debug_aranges entries can't have length zero'

@ayermolo
Copy link
Contributor

BOLT, but it's a low priority. Also there was sentiment expressed by some in llvm community that this section should be dropped, as it's a duplicate of what's in unit die.

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