bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] *** glibc detected *** awk: double free or corruption (fa


From: Hermann Peifer
Subject: Re: [bug-gawk] *** glibc detected *** awk: double free or corruption (fasttop): 0x0000000001b32710 ***
Date: Fri, 26 Jun 2015 15:17:06 +0200

Hi again,

I noted some commits in gawk/master and my one-liner no longer makes awk die: 
awk 'BEGIN{x=@/abc/; print typeof(x); print x}'

The one-liner was actually the trimmed version of test.awk (see below) where I 
wanted to check this behaviour: "When used in numeric conversions, strongly 
typed regexp variables convert to zero. When used in string conversions, they 
convert to the string value of the original regexp text."

The test code still fails, I am afraid. This is however only invented test 
code, not a real use case for typed regexp variables.

Hermann


$ cat test.awk
BEGIN {
        x = @/xxx/
        y = @/yyy/
        print typeof(x), typeof(y)
        print x, y

        x++
        y = y ""
        print typeof(x), typeof(y)
        print x, y
}

$ awk -f test.awk
regexp regexp
xxx yyy
number string
*** glibc detected *** awk: double free or corruption (fasttop): 
0x0000000001959fe0 ***
...

Hermann wrote on 24 June:
> I just ran into the below problem, using gawk/master on GNU/Linux. Hermann
> 
> # So far, so good
> $ awk 'BEGIN{x=@/abc/; print typeof(x)}'
> regexp
> 
> # This makes awk die
> $ awk 'BEGIN{x=@/abc/; print typeof(x); print x}'
> regexp
> *** glibc detected *** awk: double free or corruption (fasttop): 
> 0x0000000001b32710 ***
> ======= Backtrace: =========
> /lib/libc.so.6(+0x71e16)[0x7f1ccad23e16]
> /lib/libc.so.6(cfree+0x6c)[0x7f1ccad28b8c]
> awk(r_unref+0x49)[0x464529]
> awk(do_print+0x267)[0x41c9a7]
> awk(r_interpret+0x181b)[0x44451b]
> awk(main+0x1339)[0x45eaa9]
> /lib/libc.so.6(__libc_start_main+0xfd)[0x7f1ccacd0c8d]
> awk[0x40cd29]
> ======= Memory map: ========
> (...)
> ▒&▒Aborted
> $
> 
>



reply via email to

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