Sponsored Content
Top Forums Programming Segmentation Fault (core dumped) Post 96462 by blowtorch on Friday 20th of January 2006 06:23:18 AM
Old 01-20-2006
Trying to read from an illegal memory location will cause this fault. i.e.

Quote:
1. If you fopen a file, it fails and the file pointer returned is NULL and you try to read from that file pointer. This will give you a segmentation fault.
This User Gave Thanks to blowtorch For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Segmentation fault (core dumped)

Hello To All! Now anfd then I receive a message on my console: Segmentation fault (core dumped) What does it mean? Or more precisely what are the implications? :confused: (1 Reply)
Discussion started by: Ivo
1 Replies

2. 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

3. Solaris

Segmentation Fault (core dumped)

i am getting Segmentation Fault (core dumped) on solaris, but when i run the same program with same input on linux it runs successfully. How can i trace the fault in program on solaris. (6 Replies)
Discussion started by: junaid.nehvi
6 Replies

4. Solaris

segmentation fault core dumped

i am getting segmentation fault (core dumped) i tried following things but couldn't understand what is wrong with my prog and where the problem is.... i have only adb debugger available on solaris.... so plz help bash-3.00$ pstack core core 'core' of 765: ./mod_generalised_tapinread... (4 Replies)
Discussion started by: junaid.nehvi
4 Replies

5. Red Hat

Segmentation fault (core dumped)

Hi All, I am getting "Segmentation fault (core dumped)" error in the runtime. I am new this please can you tell me why is that i am getting this error and I am not sure of my compilation : gcc -c avc_test.c gcc -c md5.c gcc avc_test.o md5.o -shared -Llibcoreavc_sdk.so -o proj ... (1 Reply)
Discussion started by: fido.genial
1 Replies

6. Programming

getting Segmentation Fault (core dumped) error but Program runs fine.

i am executing following program int main() { char str; FILE * fp; int i=0; ... (4 Replies)
Discussion started by: bhavesh.sapra
4 Replies

7. UNIX for Advanced & Expert Users

Segmentation Fault/ core dumped in metadb

When I was trying to mirror in my v880 server after OS up gradation from 8 to 10 metadb -afc 3 /dev/dsk/c1t1d0s7 I got an error metadb: Segmentation Fault Segmentation Fault (core dumped) Then I logged a case to Oracle/sun team they suggest "Please could you try metadb -ac 3... (0 Replies)
Discussion started by: taherahmed
0 Replies

8. 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

9. UNIX and Linux Applications

Tilda Segmentation fault (core dumped)

Can anyone tell me why I keep getting a Segmentation fault when I try to run tilda? $ tilda Segmentation fault (core dumped) It seemed to run after I deleted my tilda directory like this thread said to do. Unfortunately it wouldn't let me set my keybinding with anything I tried. ... (0 Replies)
Discussion started by: cokedude
0 Replies

10. UNIX for Dummies Questions & Answers

Find a string across line break (because of "segmentation fault core dumped")

Hi, thanks to a precedent post, and thanks to the reply of derekludwig of the forum, I have convert my first awk command as : test.txt is : AAAAAGHIJKLAjKMEFJKLjklABCDJkLEFGHIJKL awk -f findstring.awk test.txt > textreturn.txtfindstring.awk is : BEGIN{ SLENGTH = 3 } { ... (3 Replies)
Discussion started by: thewizarde6
3 Replies
gcore(1)						    BSD General Commands Manual 						  gcore(1)

NAME
gcore -- get core images of running processes SYNOPSIS
gcore [-s] [-v] [-b size] [-o path | -c pathformat] pid DESCRIPTION
The gcore program creates a core file image of the process specified by pid. The resulting core file can be used with a debugger, e.g. lldb(1), to examine the state of the process. The following options are available: -s Suspend the process while the core file is captured. -v Report progress on the dump as it proceeds. -b size Limit the size of the core file to size MiBytes. The following options control the name of the core file: -o path Write the core file to path. -c pathformat Write the core file to pathformat. The pathformat string is treated as a pathname that may contain various special characters which cause the interpolation of strings representing specific attributes of the process into the name. Each special character is introduced by the % character. The format characters and their meanings are: N The name of the program being dumped, as reported by ps(1). U The uid of the process being dumped, converted to a string. P The pid of the process being dumped, converted to a string. T The time when the core file was taken, converted to ISO 8601 format. % Output a percent character. The default file name used by gcore is %N-%P-%T. By default, the core file will be written to a directory whose name is determined from the kern.corefile MIB. This can be printed or modified using sysctl(8). The directory where the core file is to be written must be accessible to the owner of the target process. gcore will not overwrite an existing file, nor will it create missing directories in the path. EXIT_STATUS The gcore utility exits 0 on success, and >0 if an error occurs. FILES
/cores/%N-%P-%T default pathname for the corefile. BUGS
With the -b flag, gcore writes out as much data as it can up to the specified limit, even if that results in an incomplete core image. Such a partial core dump may confuse subsequent programs that attempt to parse the contents of such files. SEE ALSO
lldb(1), core(5), Mach-O(5), sysctl(8), sudo(8). Darwin May 31, 2019 Darwin
All times are GMT -4. The time now is 04:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy