mbox series

[0/2] fix union merge with binary files

Message ID YMIKwsEFnkqz6PWa@coredump.intra.peff.net (mailing list archive)
Headers show
Series fix union merge with binary files | expand

Message

Jeff King June 10, 2021, 12:51 p.m. UTC
This started as an attempt to silence a "gcc -O3" warning. But I was
curious if we could trigger the problem it complains about in practice
(spoiler: we can), so I wrote a test. And it seems there was an even
bigger bug lurking, where we'd generate bogus merge results. :)

This fixes both bugs.

  [1/2]: ll_binary_merge(): handle XDL_MERGE_FAVOR_UNION
  [2/2]: ll_union_merge(): pass name labels to ll_xdl_merge()

 ll-merge.c            |  6 ++++--
 t/t6406-merge-attr.sh | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

-Peff

Comments

Elijah Newren June 10, 2021, 3:19 p.m. UTC | #1
On Thu, Jun 10, 2021 at 5:54 AM Jeff King <peff@peff.net> wrote:
>
> This started as an attempt to silence a "gcc -O3" warning. But I was
> curious if we could trigger the problem it complains about in practice
> (spoiler: we can), so I wrote a test. And it seems there was an even
> bigger bug lurking, where we'd generate bogus merge results. :)
>
> This fixes both bugs.

Nice catches, and fixes.  I had a minor comment on 2/2, but with or
without fixing up the 'path_unused' variable name both patches are:

Reviewed-by: Elijah Newren <newren@gmail.com>