[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gensub crash
From: |
arnold |
Subject: |
Re: gensub crash |
Date: |
Mon, 23 Oct 2023 12:00:13 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Hi.
Thank you for the report.
"Miguel Pineiro Jr." <mpj@pineiro.cc> wrote:
> Hello, everyone. I hope this report finds you well.
>
> While working on ota's gensub, I discovered that gawk's gensub crashes
> when there is no match and the final argument is a string converted
> from the result of a binary arithmetic operation with at least one
> variable operand.
>
> $ git branch --verbose --list master
> * master c2999b43 Another small doc fix.
> $ ./gawk 'BEGIN { x=1; print gensub(/a/, "b", 1, x+1) }'
> gawk: cmd. line:1: fatal error: internal error
> Aborted (core dumped)
Interestingly, this didn't core dump for me, it just produced
garbage. But I got the same valgrind error.
The fix was simple, and is attached.
Arnold
gensubfix.diff
Description: Text document
- gensub crash, Miguel Pineiro Jr., 2023/10/23
- Re: gensub crash,
arnold <=