bug-diffutils
[Top][All Lists]
Advanced

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

[bug-diffutils] bug#64316: bug#64316: ASAN failures in dir.c


From: Paul Eggert
Subject: [bug-diffutils] bug#64316: bug#64316: ASAN failures in dir.c
Date: Wed, 28 Jun 2023 15:31:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 2023-06-28 03:32, Gisle Vanem wrote:
'PTRDIFF_T_MAX - - 3' folds to '-9223372036854775806'.

But how can 'linbuf_base' become negative?

Ordinarily it's zero, but it can be negative. It's never positive.

Thanks for the report. I reproduced the signed integer overflow issue with -fsanitize=undefined and installed the attached patch to fix it and add a regression test (and also a comment about linbuf_base).

Although I don't see how this would fix a "memory exhausted" error, please give the latest Git commit a try and see whether it fixes things for you.

Attachment: 0001-diff-fix-xpalloc-related-signed-integer-overflow.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]