GNU bug report logs -
#13127
[PATCH] cut: use only one data strucutre
Previous Next
Reported by: xojoc <at> gmx.com
Date: Sun, 9 Dec 2012 10:29:01 UTC
Severity: normal
Tags: patch
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
From: Pádraig Brady
> Sent: 04/26/13 07:24 PM
> To: Alexandru Cojocaru
> Subject: Re: bug#13127: [PATCH] cut: use only one data strucutre
>
> On 04/26/2013 07:52 PM, Alexandru Cojocaru wrote:
> > Hi,
> > sorry for the delay.
> >
> > From: Pádraig Brady
> >> Sent: 04/26/13 04:07 PM
> >> To: xojoc <at> gmx.com
> >> Subject: Re: bug#13127: [PATCH] cut: use only one data strucutre
> >
> >> The rebase wasn't trivial so I might have messed up.
> > Hum, I had problems only with `cut.pl'.
>
> Did you pull the latest master?
> The last patch I sent is against that.
Ah, yeah I used your patch. This is why it worked.
> >> The cut.pl test is now failing on master. Could you have a look.
> > I had no problems. Could you show me your output?
>
> Ah the failures are in tests I added in the meantime:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=51ce0bf8
>
> Specifically this is now only outputting the first field,
> rather than both fields like it should:
>
> printf '%s\n' a:1 b:2 | src/cut -s -d: -f1,2
The problem was caused by `current_rp' which wasn't
incremented as needed. See attachment for patch.
My tests were succesfull, can you recheck?
> >> Also could you add a test (or just a bit of shell) to demonstrate
> >> which options the memory is not allocated for example.
> >> Ideally some pathological option combo that no longer
> >> allocates huge amounts of RAM.
> > $ echo a | cut -b1-$(echo '2^32-1'|bc)
> > cut: memory exhausted
>
> Ok cool, I was just ensuring I didn't miss anything.
>
> > Could you please write the test? It seems that I should use $limits
> > but I don't know how exactly :-). Thanks.
>
> I'll write a test based on:
> (ulimit -v 20000; : | cut -b1-$((2**32-1))) || echo fail
Thanks for the test case.
> thanks,
> Pádraig.
Best regards,
Cojocaru Alexandru
[cut-fix-bug.patch (application/octet-stream, attachment)]
This bug report was last modified 12 years and 77 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.