Re: [RFC] PR 34481 arbitrary limit on decompressed size of .dwo files

Jan Beulich <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
On 25.08.2026 07:14, Alan Modra wrote:
> PR34481 exposes a failure of a heuristic in bfd_section_size_insane
> dealing with compressed sections.  The assumption there is that a
> compressed section would not be more than ten times the total file
> size.  This of course is foolish since one highly compressed section
> can easily exceed ten times the total file size.  However, it mostly
> worked for real object files.  The claim in pr34481 is that the limit
> has been hit for .dwo files in a real C++ codebase.  I don't find that
> claim unbelievable.
> 
> While we could work around the .dwo problem with the following patch,
> I'm inclined to simply remove the whole "size / 10 > filesize" block.
> 
> My reasoning is that this is anti-fuzzer code.  If we allow a .dwo
> hole then the anti-fuzzer code may as well not be there.  Fuzzers will
> soon find the hole.
> 
> What do you all think?

I agree, fwiw. (I don't like such arbitrary limits anyway.)

Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.