bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] Yet another: pointer being freed was not allocated


From: Hermann Peifer
Subject: [bug-gawk] Yet another: pointer being freed was not allocated
Date: Mon, 29 Jun 2015 20:47:12 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi again,

Below another memory issue when using typed regexp. The error occurs both on Linux and Mac OS. The test code is completely invented and not related to any meaningful use of typed regexp, but I thought that the bug is worth sending to the list.

Hermann

$ cat typedre.awk
BEGIN {
        a[1] = @/abc/
        b[1][2][3] = @/xyz/
        print typeof(a[1]), typeof(b[1][2][3])
        print a[1], b[1][2][3]

        a[1]++
        b[1][2][3] ""
        print typeof(a[1]), typeof(b[1][2][3])
        print a[1], b[1][2][3]
}

# Last line looks strange..
$ awk -f typedre.awk
regexp regexp
abc xyz
number regexp
1 1gexp

# Profiling makes awk die..
$ awk -p -f typedre.awk
regexp regexp
abc xyz
number regexp
1 1gexp
awk(10398,0x7fff77dd7300) malloc: *** error for object 0x7fc8f0c093e0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6



reply via email to

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