Sponsored Content
Top Forums UNIX for Dummies Questions & Answers 'memory corruption' error when using Awk Post 302332469 by kooyee on Thursday 9th of July 2009 08:12:26 AM
Old 07-09-2009
'memory corruption' error when using Awk

Hello, everyone.
I got the following error when I am using awk to analysis some text file:

*** glibc detected *** awk: malloc(): memory corruption: 0x080c67f8 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7e35356]
/lib/tls/i686/cmov/libc.so.6[0xb7e3655a]
/lib/tls/i686/cmov/libc.so.6(realloc+0x10b)[0xb7e3875b]
awk[0x80569d5]
awk[0x805430a]
awk[0x805453c]
awk[0x805465e]
awk[0x8054a11]
awk[0x804dec1]
awk[0x804ce0d]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7ddf450]
awk[0x8048fa1]
======= Memory map: ========
08048000-0805e000 r-xp 00000000 08:02 7468 /usr/bin/mawk
0805e000-08060000 rw-p 00015000 08:02 7468 /usr/bin/mawk
08060000-080e6000 rw-p 08060000 00:00 0 [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7dbc000-b7dc6000 r-xp 00000000 08:02 10377 /lib/libgcc_s.so.1
b7dc6000-b7dc7000 rw-p 0000a000 08:02 10377 /lib/libgcc_s.so.1
b7dc7000-b7dc9000 rw-p b7dc7000 00:00 0
b7dc9000-b7f12000 r-xp 00000000 08:02 2372 /lib/tls/i686/cmov/libc-2.7.so
b7f12000-b7f13000 r--p 00149000 08:02 2372 /lib/tls/i686/cmov/libc-2.7.so
b7f13000-b7f15000 rw-p 0014a000 08:02 2372 /lib/tls/i686/cmov/libc-2.7.so
b7f15000-b7f18000 rw-p b7f15000 00:00 0
b7f18000-b7f3b000 r-xp 00000000 08:02 6015 /lib/tls/i686/cmov/libm-2.7.so
b7f3b000-b7f3d000 rw-p 00023000 08:02 6015 /lib/tls/i686/cmov/libm-2.7.so
b7f52000-b7f54000 rw-p b7f52000 00:00 0
b7f54000-b7f55000 r-xp b7f54000 00:00 0 [vdso]
b7f55000-b7f6f000 r-xp 00000000 08:02 70920 /lib/ld-2.7.so
b7f6f000-b7f71000 rw-p 00019000 08:02 70920 /lib/ld-2.7.so
bfc1e000-bfc33000 rw-p bffeb000 00:00 0 [stack]
./test_script: line 36: 15730 Aborted

I already search in google but can not find any clue. I've used same awk script file for various text file. some works fine, but some shows the above error.

Anyone know it? Thanks in advance.Smilie

---------- Post updated at 07:12 AM ---------- Previous update was at 07:11 AM ----------

I think this error is due to access to array that I used in awk.
 

10 More Discussions You Might Find Interesting

1. Programming

Why does this occur? *** glibc detected *** malloc(): memory corruption: 0x10013ff8 ***

there seems not to be error in this segment. In some computers, it can work well. But in others, it will give a failure. why it ocurrs and how to deal with it? in a function: if( *ver == NULL ) { *ver = (vertex *) malloc(sizeof(vertex)); //this line ... (17 Replies)
Discussion started by: cdbug
17 Replies

2. UNIX for Advanced & Expert Users

Out of Memory error when free memory size is large

I was running a program and it stopped and showed "Out of Memory!". at that time, the RAM used by this process is around 4G and the free memory size of the machine is around 30G. Does anybody know what maybe the reason? this program is written with Perl. the OS of the machine is Solaris U8. And I... (1 Reply)
Discussion started by: lilili07
1 Replies

3. Programming

readdir and dynamic array memory corruption

Hi everyone I am developing an utility. At some part of it I read directory entries to a dynamic array: struct list It stores pointers to items: list.entries, which are structures: struct entry If a number of files in a directory is greater then number of elements an array was initially... (11 Replies)
Discussion started by: torbium
11 Replies

4. Programming

./match_pattern.out: malloc(): memory corruption: 0x0000000013a11600 ***

Hi All, I have a simple code which does some computation by matching string patterns. In brief: 1. The code reads .dat and .txt files. 2. .dat files are huge text files and .txt files contain some important words. 3. I am just doing strstr to find the patterns. 4. The function returns the... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

5. Programming

*** glibc detected *** ./a.out: malloc(): memory corruption (fast):

*** glibc detected *** ./a.out: malloc(): memory corruption (fast): Posted A minute ago M trying to make multiway tree and dont know what happend when this part of code get executed: 01void ins(NODE *ptr) 02{ 03 //working 04 if(ptr!=NULL) 05 { 06 SNODE *var=NULL; 07 var=(SNODE... (3 Replies)
Discussion started by: exgenome
3 Replies

6. Programming

*** glibc detected *** : malloc(): memory corruption (fast)

Hi Friends, while executing the below code, am getting *** glibc detected *** ./ok: malloc(): memory corruption (fast) error, please suggest how to solve this issue. #include <stdio.h> #include <string.h> #include <sqlca.h> #include <alloca.h> /* Define constants for VARCHAR... (2 Replies)
Discussion started by: mpjobsrch
2 Replies

7. Programming

*** glibc detected *** ./a.out malloc() memory corruption

I am facing a problem of memory corruption. The loop runs for the first time but does not go through the second time. What could be the problem? for(int z=0;z<2;z++) { fp=fopen("poly.dat","r"); /*do something which reads this file into a 2D array*/ fclose(fp); ... (10 Replies)
Discussion started by: dare
10 Replies

8. Solaris

Solaris 10 Shared Memory Corruption with X11

I am having a problem with shared memory corruption. I have two 86 servers running Solaris 10 (150400-06). One of the servers is accessed by a Sun Ray thin client Version 11.1.3.0.2.6. I login into server one from the thin client. I then ssh -X to server two. When a process that contains a... (2 Replies)
Discussion started by: salerno
2 Replies

9. Programming

Memory corruption in dynamic array of strings

I put together a C function to add strings to a dynamic array of strings (mostly for educational purpose to explain pointers to my kid). It works, but sometimes one or two strings in the array becomes corrupted. Running example on 64 bit Ubuntu, gcc ver. 4.8.4 Hope my code is self-explanatory: ... (2 Replies)
Discussion started by: migurus
2 Replies

10. Solaris

Solaris 11.2 x86 Local Zones for Oracle RAC database, intermittent Memory corruption of db

Hi, I was wondering if any Solaris fellow out there has dealt with running Solaris 11 x86 on Local Zones for Oracle RAC (which may or may not be relevant to issue), running on HP gen h/w. Every so often could be weeks between issues or some times days, there will be a memory corruption and db... (2 Replies)
Discussion started by: crossmypath
2 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgawk | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+ NOTES
Source for gawk is available on http://opensolaris.org. Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy