12-02-2008
memory fault(core dump)
i am getting memory fault (core dump) in a C program
i want to know which statement execution caused it.
i tried following things
$ gdb generalised_tapinread_mod
HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
(gdb) r /TRAP_TR/telcel_pr/RAW/BP/POPROMTAPOUT/SOURCE/CDMEXTLUSA2702258 3.11_selectedfields generalised_config.
Starting program: /TRAP_TR/telcel_pr/EXE/generalised_tapinread_mod /TRAP_TR/telcel_pr/RAW/BP/POPROMTAPOUT/SOURC
Process Start Time - Mon Dec 1 23:10:50 2008
Program received signal SIGSEGV, Segmentation fault
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
0x4006350:0 in parseBinaryFile () at generalised_tapinread_mod.c:646
646 cur_add->nodeProcessed = YES;
(gdb) print cur_add->nodeProcessed
Cannot access memory at address 0x325
(gdb) print cur_add
$1 = (struct node *) 0x1
but the line no "646" doesn't seem to be problematic to me.....
can someone tell me how to debug the error in my code.
thanks in advance
Last edited by junaid.nehvi; 12-02-2008 at 06:16 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
2. Programming
MY friends:
my program under sco unix have a problem?
it create a core dump file on the path when execute program ,
but i can't find the error of the C program ,i don't know how to
see the error about my program use core, please help me
or give me some suggest and what tools can use... (1 Reply)
Discussion started by: zhaohaizhou
1 Replies
3. UNIX for Advanced & Expert Users
I use SCO UNIX 5.07 on a Compaq Proliant Machine. Each time I press the Escape or Delete key while running a program or issuing a FoxBase+ command from the dot prompt, I receive the error message: "Memory Fault - Core Dumped" and the screen locks up immediately.
I would appreciate if necessary... (0 Replies)
Discussion started by: bayuz
0 Replies
4. Programming
I have written a code in UNIX which is complied by using g++. Compling with turbo C didnt yield any errors, but with g++ I am getting Memory fault, core dumped. Could anyone help me out with this?
Given below is the code:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>... (2 Replies)
Discussion started by: usshell
2 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I have this dbt since long ...
What is the difference between Segmentation Fault and Core Dump ?
As far as I know Seg fault is due to memory leakage or memory which cannot be accessed.
Please let me know if I am wrong.
Can some one tell me what is the diff between Segmentation... (1 Reply)
Discussion started by: shubhranshu
1 Replies
6. UNIX for Dummies Questions & Answers
im performing the dump command :
dump 0uaf /dev/hdc /home
an error msg appers says:
DUMP: you cant update the dumpdates file while dumping a subdirectory
DUMP: the entire dump is aborted
can anyone help (6 Replies)
Discussion started by: semosam
6 Replies
7. Shell Programming and Scripting
Hi all,
I have a folder with some 28 files. I have a script file that will iteratively take one file at a time from the folder and provide an output for the input file. Till the 7th file, there was no problem but from the 8th file onwards, i got this Segmentation Fault(Core Dump) error. A file... (2 Replies)
Discussion started by: mick_000
2 Replies
8. Programming
I´m writing this program in QNX , I`m kinda new to UNIX and programing in general, and when I try to run it it gives me the Memory Fault error. Can anyone help?
#include <stdio.h>
#include <fcntl.h>
void main(void)
{int a,ter;
char buf;
printf("a=");
scanf("%d",a);
ter=open... (6 Replies)
Discussion started by: GiganteAsesino
6 Replies
9. Programming
When I run programm show this message: Memory Fault (core dumped)
Does anyone can help me and tell me what is wrong? please
#include <stdlib.h>
#include <stdio.h>
#include <process.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(int argc, char *argv) { ... (3 Replies)
Discussion started by: ebasse2
3 Replies
10. UNIX for Dummies Questions & Answers
I have an application which crashed while accessing a shared memory.
typedef struct
{
...
} LnxUserData;
LnxUserData *ptrLnxUserData;
fd = shm_open(shrSegName, O_CREAT|O_RDWR|O_EXCL, 0644);
if(fd == -1 && errno == EEXIST)
{
fd = shm_open(shrSegName, O_CREAT|O_RDWR, 0644);
}... (6 Replies)
Discussion started by: rupeshkp728
6 Replies
GCORE(1) General Commands Manual GCORE(1)
NAME
gcore - get core image of running process
SYNOPSIS
gcore [-s][-c core] pid
DESCRIPTION
gcore creates a core image of each specified process, suitable for use with adb(1). By default the core image is written to the file
<pid>.core.
The options are:
-c Write the core file to the specified file instead of <pid>.core.
-s Stop the process while creating the core image and resume it when done. This makes sure that the core dump will be in a consistent
state. The process is resumed even if it was already stopped. Of course, you can obtain the same result by manually stopping the
process with kill(1).
The core image name was changed from core.<pid> to <pid>.core to prevent matching names like core.h and core.c when using programs such as
find(1).
FILES
<process-id>.core The core image.
BUGS
If gcore encounters an error while creating the core image and the -s option was used the process will remain stopped.
Swapped out processes and system processes (the swapper) may not be gcore'd.
4.2 Berkeley Distribution April 15, 1994 GCORE(1)