Re: [RFC PATCH 00/10] range-diff: fix segfault due to integer overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ævar,

On Thu, 9 Dec 2021, Ævar Arnfjörð Bjarmason wrote:

> The difference between "master" and "git-for-windows/main" is large
> enough that comparing the two will segfault on my system. This is
> because the range-diff code does some expensive calculations and will
> overflow the "int" type.

You are holding this thing wrong.

The `main` branch of Git for Windows uses merging rebases, therefore you
need to use a commit range like
`git-for-windows/main^{/^Start.the.merging}..git-for-windows/main` and
compare it to `git-for-windows/main..master`.

Failing that, you will receive only bogus results.

As to the patch series, it likely does the wrong thing. Just like we error
out on insanely large input in libxdiff, `range-diff` should do the same.

Ciao,
Johannes

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux