[PATCH v2] elf: Report corrupted group section

H.J. Lu hjl.tools@gmail.com
Mon Jun 23 07:42:25 GMT 2025


On Mon, Jun 23, 2025 at 3:18 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 23.06.2025 08:44, H.J. Lu wrote:
> > 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.
> >
> > Fixed.  Here is the v2 patch with the updated comments and a single
> > check.
>
> As this doesn't add any new UB (afaict) - okay. Implied from this is that
> I don't think the code is UB-free just yet. But that likely wants taking
> care of another day.
>
> Jan

I am checking it in.

Thanks.

-- 
H.J.


More information about the Binutils mailing list