[PATCH 1/2] Thread-safety improvements for bfd_check_format_matches

Tom Tromey tom@tromey.com
Mon Apr 15 18:14:37 GMT 2024


>>>>> "Alan" == Alan Modra <amodra@gmail.com> writes:

Alan> I suspect you have changed things a little.  The curent per_xvec_warn
Alan> array has an extra element to cache messages emitted when xvec is
Alan> NULL.  I added that just in case such a thing ever happened.  I don't
Alan> think it does, so I'm not at all concerned about a change in behaviour
Alan> when xvec is NULL.

Alan> However, the new _bfd_per_xvec_warn does seem to be a little weird
Alan> should messages->abfd-xvec ever be NULL.  It seems it will create a
Alan> new entry in the list for a NULL targ that then might be reused for a
Alan> later non-NULL targ message.  Also, the description for the new
Alan> _bfd_per_xvec_warn needs updating and maybe the function should be
Alan> made static and moved from targets.c to bfd.c.

Thanks for the review.

I've made these changes, and since I was already in there I went ahead
and fixed the NULL xvec issue as well.

I'll send v2 momentarily.

Tom


More information about the Binutils mailing list