This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] sanity check bfd_is_section_compressed header


> Had a customer library where the first string in [non-compressed]
> .debug_str was "ZLIB_COMPRESS_ERROR".  The linker tried to allocate a
> few hundred terabytes to decompress it, because it *only* checks for
> "ZLIB" as the signature.  On ASCII systems, this sanity check assumes
> an uncompressed size greater than half a terabyte is unreasonable.  Is
> this a reasonable sanity check?  (if you answer "no" you get to come
> up with a better check ;)

Hmmm, the linker shouldn't even be looking for "ZLIB" unless the
section name is ".zdebug_str" (or, for the new gABI feature, unless
the SHF_COMPRESSED flag is set). Wouldn't that be a better check?

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]