[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] $0 reassignment corruption in 4.2
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] $0 reassignment corruption in 4.2 |
Date: |
Mon, 13 Nov 2017 16:24:44 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
I think this simple test case demonstrates the problem. The assertion
fails, at least:
bash-4.2$ cat /tmp/test.awk
function reassign(x, y) {
$0 = x
print y
}
{
reassign("larry", $1)
}
bash-4.2$ echo hello | gawk -f /tmp/test.awk
debug $0: flags MALLOC|STRING|STRCUR stptr 0x2233530 stlen 5 string [larry]
valref 3
debug $1: flags STRING|STRCUR|USER_INPUT stptr 0x2239710 stlen 5 string [hello]
valref 2
gawk: field.c:357: purge_record: Assertion `(fields_arr[i]->flags & 0x0001) ==
0 ? fields_arr[i]->sub.val.sref == 1 : 1' failed.
Aborted (core dumped)
(I added those first 2 debug statements to field.c:purge_record.)
The test code is attached. I hope that fixing this may fix the big
mdlint test case. But I don't have a patch yet. Any takers?
Regards,
Andy
test.awk
Description: Text document
- Re: [bug-gawk] Function argument corruption in 4.2.0, (continued)
- Re: [bug-gawk] Function argument corruption in 4.2.0, Andrew J. Schorr, 2017/11/12
- Re: [bug-gawk] Function argument corruption in 4.2.0, Eric Pruitt, 2017/11/12
- Re: [bug-gawk] Function argument corruption in 4.2.0, Eric Pruitt, 2017/11/12
- Re: [bug-gawk] Function argument corruption in 4.2.0, Andrew J. Schorr, 2017/11/12
- Re: [bug-gawk] Function argument corruption in 4.2.0, Eric Pruitt, 2017/11/13
- Re: [bug-gawk] Function argument corruption in 4.2.0, Andrew J. Schorr, 2017/11/13
- Re: [bug-gawk] Function argument corruption in 4.2.0, Andrew J. Schorr, 2017/11/13
- Re: [bug-gawk] Function argument corruption in 4.2.0, Andrew J. Schorr, 2017/11/13
- Re: [bug-gawk] Function argument corruption in 4.2.0, arnold, 2017/11/13
- Re: [bug-gawk] Function argument corruption in 4.2.0, Andrew J. Schorr, 2017/11/13
- Re: [bug-gawk] $0 reassignment corruption in 4.2,
Andrew J. Schorr <=
- Re: [bug-gawk] $0 reassignment corruption in 4.2, Andrew J. Schorr, 2017/11/13
- Re: [bug-gawk] $0 reassignment corruption in 4.2, Eric Pruitt, 2017/11/13
- Re: [bug-gawk] $0 reassignment corruption in 4.2, Andrew J. Schorr, 2017/11/13
- Re: [bug-gawk] $0 reassignment corruption in 4.2, arnold, 2017/11/14
- Re: [bug-gawk] $0 reassignment corruption in 4.2, arnold, 2017/11/14
- Re: [bug-gawk] $0 reassignment corruption in 4.2, Andrew J. Schorr, 2017/11/14
- Re: [bug-gawk] $0 reassignment corruption in 4.2, Andrew J. Schorr, 2017/11/14
- Re: [bug-gawk] $0 reassignment corruption in 4.2, arnold, 2017/11/14
- Re: [bug-gawk] $0 reassignment corruption in 4.2, Andrew J. Schorr, 2017/11/14
- Re: [bug-gawk] $0 reassignment corruption in 4.2, arnold, 2017/11/14