[PATCH v2] elf: Report corrupted group section
H.J. Lu
hjl.tools@gmail.com
Mon Jun 23 06:44:30 GMT 2025
On Mon, Jun 23, 2025 at 2:28 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 21.06.2025 00:54, H.J. Lu wrote:
> > Report corrupted group section instead of trying to recover.
> >
> > PR binutils/33050
> > * elf.c (bfd_elf_set_group_contents): Report corrupted group
> > section.
>
> The check ahead of the BFD_ASSERT() that you replace isn't quite in sync
> with the comment ahead of it. Instead that comment extends to the 2nd
> check further down as well. The latest with your adjustment, is there any
> reason the two if() can't simply be combined into just one? Possible
> concerns towards UB don't look to be (fully) taken care of by that split,
> so apparently that wasn't the original reason to write it like this.
>
> Jan
Fixed. Here is the v2 patch with the updated comments and a single
check.
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-elf-Report-corrupted-group-section.patch
Type: text/x-patch
Size: 1618 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250623/7ebfa327/attachment.bin>
More information about the Binutils
mailing list