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.