[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4 |
Date: |
Wed, 28 Aug 2019 17:01:00 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Aug 28, 2019 at 04:08:00PM -0400, Andrew J. Schorr wrote:
> This patch fixes my test case (bug5), but is not more generally correct (it
> does not pass make check, dumping core on rebt8b2 and hanging on regexprange
> and failing sortu):
>
> diff --git a/interpret.h b/interpret.h
> index 3215833..4820716 100644
> --- a/interpret.h
> +++ b/interpret.h
> @@ -1065,6 +1065,8 @@ match_re:
> if (op != Op_match_rec) {
> decr_sp();
> DEREF(t1);
> + if (m->type == Node_dynregex)
> + DEREF(m->re_exp);
> }
> r = node_Boolean[di];
> UPREF(r);
>
> Arnold -- do you have any insight into the correct fix?
Ah, OK, I see that m->re_exp was getting DEREF'ed under Op_match on a delayed
basis, but that doesn't work when the dynamic regexp was in a field variable.
The attached patch seems to fix Finn's problem and passes "make check"
and "make valgrind-noleak". But I'm still not 100% confident that it's
right. Arnold -- can you please review this? My understanding of
the Node_dynregex mechanism is not great, and it makes me a bit nervous
to set m->re_exp without first DEREF'ing its contents. But it seems
to work.
And Finn, if easy, please test this.
Thanks,
Andy
dynregex.field.patch
Description: Text document
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, (continued)
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, arnold, 2019/08/25
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Finn Magnusson, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, arnold, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4,
Andrew J. Schorr <=
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/28
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, arnold, 2019/08/29
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, Andrew J. Schorr, 2019/08/29
- Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4, arnold, 2019/08/29
- Re: [bug-gawk] memory issues, Andrew J. Schorr, 2019/08/29
- Re: [bug-gawk] memory leak/corruption issues, Andrew J. Schorr, 2019/08/29
- Re: [bug-gawk] memory leak/corruption issues, Andrew J. Schorr, 2019/08/29
- Re: [bug-gawk] memory issues, Andrew J. Schorr, 2019/08/29