memory fault(core dump)


 
Thread Tools Search this Thread
Operating Systems HP-UX memory fault(core dump)
# 1  
Old 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..
# 2  
Old 12-02-2008
Try clearing cache- sync; echo 3 > /proc/sys/vm/drop_caches
# 3  
Old 12-04-2008
techlinux
Try clearing cache- sync; echo 3 > /proc/sys/vm/drop_caches
******************************************************
i tried it but without any success....
memory fault still continues to come.
But same program doesn't give any error on GNU/Linux wit same inputs as given for the one on HP-UX
can't understant what thr problem really is???
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Collecting Shared Memory in core dump

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

2. Programming

C: Memory Fault (core dumped)

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

3. Programming

Memory Fault (core dumped) in ttpy program

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

4. Shell Programming and Scripting

Segmentation Fault(Core Dump) Error

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

5. UNIX for Dummies Questions & Answers

dump command fault

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

6. UNIX for Advanced & Expert Users

Segmentation Fault and Core dump

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

7. Programming

Memory Fault,Core dumped

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

8. UNIX for Advanced & Expert Users

Memory Fault - Core Dumped

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

9. Programming

about core dump

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

10. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
Login or Register to Ask a Question