From: Omar Sandoval <osandov@osandov.com>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org
Subject: Re: [PATCH v3 4/4] libdw: Handle overflowed DW_SECT_INFO offsets in DWARF package file indexes
Date: Fri, 1 Mar 2024 14:36:31 -0800 [thread overview]
Message-ID: <ZeJYb58tM7cKRWru@telecaster> (raw)
In-Reply-To: <d0ab1eb8b5d24c5117d69bd657c58f784139427f.camel@klomp.org>
On Fri, Mar 01, 2024 at 03:59:22PM +0100, Mark Wielaard wrote:
> Hi Omar,
>
> On Mon, 2024-02-26 at 11:32 -0800, Omar Sandoval wrote:
> > Meta uses DWARF package files for our large, statically-linked C++
> > applications. Some of our largest applications have more than 4GB in
> > .debug_info.dwo, but the section offsets in .debug_cu_index and
> > .debug_tu_index are 32 bits; see the discussion here [1]. We
> > implemented a workaround/extension for this in LLVM. Implement the
> > equivalent in libdw.
> >
> > To test this, we need files with more than 4GB in .debug_info.dwo. I
> > created these artificially by editing GCC's assembly output. They
> > compress down to 6KB. I test them from run-large-elf-file.sh to take
> > advantage of the existing checks for large file support.
> >
> > 1: https://discourse.llvm.org/t/dwarf-dwp-4gb-limit/63902.
> >
> > * libdw/dwarf_end.c (dwarf_package_index_free): New function.
> > * tests/testfile-dwp-4-cu-index-overflow.bz2: New test file.
> > * tests/testfile-dwp-4-cu-index-overflow.dwp.bz2: New test file.
> > * tests/testfile-dwp-5-cu-index-overflow.bz2: New test file.
> > * tests/testfile-dwp-5-cu-index-overflow.dwp.bz2: New test file.
> > * tests/testfile-dwp-cu-index-overflow.source: New file.
> > * tests/run-large-elf-file.sh: Check
> > testfile-dwp-5-cu-index-overflow and
> > testfile-dwp-4-cu-index-overflow.
>
> The hack is kind of horrible, but given that this doesn't really
> impacts "normal" dwp files and it does work with clang/lldb, lets just
> support it too.
Yup, I hate it, too. Thanks for merging this series and for the followup
fixes!
prev parent reply other threads:[~2024-03-01 22:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 19:32 [PATCH v3 0/4] elfutils: DWARF package (.dwp) file support Omar Sandoval
2024-02-26 19:32 ` [PATCH v3 1/4] libdw: Handle split DWARF in dwarf_decl_file Omar Sandoval
2024-02-29 22:08 ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 2/4] libdw: Refactor dwarf_next_lines and fix skipped CU Omar Sandoval
2024-02-29 22:59 ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 3/4] libdw: Apply DWARF package file section offsets where appropriate Omar Sandoval
2024-02-29 23:49 ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 4/4] libdw: Handle overflowed DW_SECT_INFO offsets in DWARF package file indexes Omar Sandoval
2024-03-01 14:59 ` Mark Wielaard
2024-03-01 16:11 ` Mark Wielaard
2024-03-01 22:36 ` Omar Sandoval [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZeJYb58tM7cKRWru@telecaster \
--to=osandov@osandov.com \
--cc=elfutils-devel@sourceware.org \
--cc=mark@klomp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).