[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] memory leak/corruption issues
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] memory leak/corruption issues |
Date: |
Thu, 29 Aug 2019 14:46:24 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
And clearly there's another bug in profile.c:pp_list:
if (nargs > 0) {
r = pp_args[nargs];
memcpy(s, r->pp_str, r->pp_len);
s += r->pp_len;
pp_free(r);
for (i = nargs - 1; i > 0; i--) {
if (delimlen > 0) {
memcpy(s, delim, delimlen);
s += delimlen;
}
if (r->pp_comment != NULL) {
check_indent_level();
comment = (INSTRUCTION *) r->pp_comment;
memcpy(s, comment->memory->stptr,
comment->memory->stlen);
s += comment->memory->stlen;
memcpy(s, tabs, indent_level + 1);
s += indent_level + 1;
}
r = pp_args[i];
memcpy(s, r->pp_str, r->pp_len);
s += r->pp_len;
pp_free(r);
}
}
The code accesses r->pp_comment after pp_free(r) was previously called.
I'm not sure of the intent here, so I'm uncertain how to fix this.
Regards,
Andy
- 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, 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, 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 <=
- Re: [bug-gawk] memory issues, Andrew J. Schorr, 2019/08/29