*** glibc detected *** awk: munmap_chunk(): invalid pointer: 0x000000000061b26c ***

Bug #537616 reported by Matthew Twomey
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mawk (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: mawk

I'm getting this error when trying to run gt5 (http://gt5.sourceforge.net/). Gt5 uses awk, which by default is linked to mawk in karmic. If I replace mawk with gawk I don't get the error. Below is the trace, however, I'm not sure how to interpret it or what else I can do to help diagnose the issue?

*** glibc detected *** awk: munmap_chunk(): invalid pointer: 0x000000000061b26c ***
======= Backtrace: =========
/lib/libc.so.6[0x7fbeeef24dd6]
awk[0x40bcef]
awk[0x406bac]
awk[0x405f7a]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7fbeeeecdabd]
awk[0x401849]
======= Memory map: ========
00400000-0041b000 r-xp 00000000 fc:02 3269596 /usr/bin/mawk
0061a000-0061b000 r--p 0001a000 fc:02 3269596 /usr/bin/mawk
0061b000-0061d000 rw-p 0001b000 fc:02 3269596 /usr/bin/mawk
0061d000-00621000 rw-p 00000000 00:00 0
00a02000-00e20000 rw-p 00000000 00:00 0 [heap]
7fbeeec98000-7fbeeecae000 r-xp 00000000 fc:02 2384436 /lib/libgcc_s.so.1
7fbeeecae000-7fbeeeead000 ---p 00016000 fc:02 2384436 /lib/libgcc_s.so.1
7fbeeeead000-7fbeeeeae000 r--p 00015000 fc:02 2384436 /lib/libgcc_s.so.1
7fbeeeeae000-7fbeeeeaf000 rw-p 00016000 fc:02 2384436 /lib/libgcc_s.so.1
7fbeeeeaf000-7fbeef015000 r-xp 00000000 fc:02 2383885 /lib/libc-2.10.1.so
7fbeef015000-7fbeef214000 ---p 00166000 fc:02 2383885 /lib/libc-2.10.1.so
7fbeef214000-7fbeef218000 r--p 00165000 fc:02 2383885 /lib/libc-2.10.1.so
7fbeef218000-7fbeef219000 rw-p 00169000 fc:02 2383885 /lib/libc-2.10.1.so
7fbeef219000-7fbeef21e000 rw-p 00000000 00:00 0
7fbeef21e000-7fbeef2a0000 r-xp 00000000 fc:02 2383889 /lib/libm-2.10.1.so
7fbeef2a0000-7fbeef4a0000 ---p 00082000 fc:02 2383889 /lib/libm-2.10.1.so
7fbeef4a0000-7fbeef4a1000 r--p 00082000 fc:02 2383889 /lib/libm-2.10.1.so
7fbeef4a1000-7fbeef4a2000 rw-p 00083000 fc:02 2383889 /lib/libm-2.10.1.so
7fbeef4a2000-7fbeef4c1000 r-xp 00000000 fc:02 2383881 /lib/ld-2.10.1.so
7fbeef67f000-7fbeef6a2000 rw-p 00000000 00:00 0
7fbeef6bd000-7fbeef6c0000 rw-p 00000000 00:00 0
7fbeef6c0000-7fbeef6c1000 r--p 0001e000 fc:02 2383881 /lib/ld-2.10.1.so
7fbeef6c1000-7fbeef6c2000 rw-p 0001f000 fc:02 2383881 /lib/ld-2.10.1.so
7fffdc0d2000-7fffdc0e7000 rw-p 00000000 00:00 0 [stack]
7fffdc1ff000-7fffdc200000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted

Revision history for this message
Thomas Dickey (dickey-his) wrote :

There's more than one issue - gt5 immediately complains that sort does not work if I
run it in the default locale (en_US.UTF-8). Setting that to POSIX lets me run it.
However, running with karmic's old version of mawk, gt5 does not show colors.
But (still POSIX) with current mawk, gt5 does show colors.

Revision history for this message
Alienation (miguel-andrade) wrote :

problem seems to be with awk. Installing gawk is a workaround. (for gt5 1.4)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mawk (Ubuntu):
status: New → Confirmed
Revision history for this message
Nathan Weeks (weeks) wrote :

I'm not sure if this is related, but I get a similar error when I attempt to create arrays with > 64K elements; e.g., using the following sample code from the ChangeLog of mawk 1.3.4-20100419:

http://invisible-island.net/mawk/CHANGES-index.html#t20100419

+ increase size of reference-count for strings to unsigned. It was an
  unsigned short, which prevented using arrays larger than 64k, e.g.,
     BEGIN{for(i = 1; i <= 65550; ++i){if(i >= 65534 && i<= 65537) print i; s[i] = "a"}; delete s;}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.