bug-sed
[Top][All Lists]
Advanced

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

bug#30520: sed: silently fail substitution for 2GB+ single-line file


From: Jim Meyering
Subject: bug#30520: sed: silently fail substitution for 2GB+ single-line file
Date: Thu, 22 Mar 2018 22:17:15 -0700

On Thu, Mar 22, 2018 at 6:41 PM, Assaf Gordon <address@hidden> wrote:
> On Thu, Mar 22, 2018 at 05:12:11PM -0700, Jim Meyering wrote:
>> On Mon, Feb 19, 2018 at 12:32 PM, Assaf Gordon <address@hidden> wrote:
>> > On Mon, Feb 19, 2018 at 06:51:04AM +0000, YushiOMOTE wrote:
>> >> When I pass a 2GB+-single-line to sed for substitution, sed exits with
>> >> success status code but it silently fails substitution.
>> ...
>> >> Or, we can check if the value of line length exceeds INT_MAX before
>> >> reaching `re_search`. (`grep` checks it and returns with error status 
>> >> code)
>> >
>> > This is likely the simplest solution for now, without changing gnulib 
>> > itself.
>>
>> Thank you both. I too prefer this approach. Would you like to do that, Assaf?
>
> Yes, attached a suggested patch.

Great! Thank you for the quick work!
Here are some small suggested adjustments:
 - add targets so the advice on running the very expensive tests works
 - minor wording changes
 - remove apparently unnecessary "< /dev/null" from new test

Attachment: sed-2G-input-nits.diff
Description: Binary data


reply via email to

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