bug-gnu-utils
[Top][All Lists]
Advanced

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

invalid free() in gawk 3.1.5


From: Arwed von Merkatz
Subject: invalid free() in gawk 3.1.5
Date: Mon, 20 Feb 2006 17:33:55 +0100
User-agent: Mutt/1.4.2.1i

Hi,

when running gawk 3.1.5 on a non-existing file, it gets aborted by glibc
due to an invalid free():
address@hidden:~$ gawk '{ print }' invalid-filename
*** glibc detected *** free(): invalid pointer: 0x080a1380 ***
Aborted

Here's the output of a valgrind run:
address@hidden:~$ valgrind --tool=memcheck gawk '{ print }'
invalid-filename
==13271== Memcheck, a memory error detector.
==13271== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et
al.
==13271== Using LibVEX rev 1552, a library for dynamic binary
translation.
==13271== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==13271== Using valgrind-3.2.0.SVN, a dynamic binary instrumentation
framework.
==13271== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et
al.
==13271== For more details, rerun with: -v
==13271== 
==13271== Invalid free() / delete / delete[]
==13271==    at 0x4019116: free (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13271==    by 0x80724C0: iop_alloc (io.c:2498)
==13271==    by 0x8070BB3: iop_open (io.c:1602)
==13271==    by 0x806D5C6: nextfile (io.c:280)
==13271==    by 0x806DB9D: do_input (io.c:445)
==13271==    by 0x8074682: main (main.c:595)
==13271==  Address 0x80A1380 is not stack'd, malloc'd or (recently)
free'd
gawk: cmd. line:1: fatal: cannot open file `invalid-filename' for
reading (No such file or directory)
==13271== 
==13271== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 15 from
1)
==13271== malloc/free: in use at exit: 4,333 bytes in 25 blocks.
==13271== malloc/free: 2,000 allocs, 1,976 frees, 78,557 bytes
allocated.
==13271== For counts of detected errors, rerun with: -v
==13271== searching for pointers to 25 not-freed blocks.
==13271== checked 84,796 bytes.
==13271== 
==13271== LEAK SUMMARY:
==13271==    definitely lost: 0 bytes in 0 blocks.
==13271==      possibly lost: 0 bytes in 0 blocks.
==13271==    still reachable: 4,333 bytes in 25 blocks.
==13271==         suppressed: 0 bytes in 0 blocks.
==13271== Reachable blocks (those to which a pointer was found) are not
shown.
==13271== To see them, rerun with: --show-reachable=yes


This is on a system with glibc 2.3.6, gawk compiled with gcc 4.0.2.

-- 
Arwed v. Merkatz                              Source Mage GNU/Linux developer
                                                    http://www.sourcemage.org




reply via email to

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