bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] typeof1.awk causes segfault when run through the debugger


From: Hermann Peifer
Subject: Re: [bug-gawk] typeof1.awk causes segfault when run through the debugger
Date: Sun, 21 Jun 2015 18:58:08 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 2015-06-21 16:39, address@hidden wrote:
Hi.

Very nice catch.  I have started looking into this.  The debugger
doesn't understand typed regexes but I think that can be fixed.


Thanks for looking into the issue. In the same context: below is what happens if the variable is first defined as number, then used as regex.

Hermann

$ cat test.awk
BEGIN { x = 0; x = @/[a-z]/; x = "" }
$
$ printf "w x \n r \n n \n n" | awk -D -f test.awk
Watchpoint 1: x
Starting program:
Stopping in BEGIN ...
Watchpoint 1: x
  Old value: untyped variable
  New value: 0
main() at `test.awk':1
1       BEGIN { x = 0; x = @/[a-z]/; x = "" }
Watchpoint 1: x
  Old value: 0
  New value: ?? flags MALLOC
main() at `test.awk':1
1       BEGIN { x = 0; x = @/[a-z]/; x = "" }
Program exited normally with exit value: 0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]