- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Segmentation fault (core dumped)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 01:32 PM
тАО09-05-2005 01:32 PM
Segmentation fault (core dumped)
wat does this error does? I gave been getting this error when every my program ran for awhile. wat is the usual way to rectify it?
Thanks!
- Tags:
- SIGSEGV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 01:47 PM
тАО09-05-2005 01:47 PM
Re: Segmentation fault (core dumped)
What type of program are you running, java or C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 01:51 PM
тАО09-05-2005 01:51 PM
Re: Segmentation fault (core dumped)
Regards
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 04:51 PM
тАО09-05-2005 04:51 PM
Re: Segmentation fault (core dumped)
You can use any debugger like gdb, adb for that.
It will give you the why the program terminated.
- Tags:
- gdb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 05:39 PM
тАО09-05-2005 05:39 PM
Re: Segmentation fault (core dumped)
regards
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 05:53 PM
тАО09-05-2005 05:53 PM
Re: Segmentation fault (core dumped)
1) file core
2) what core
3) gdb core application-bianry
gdb) bt
gdb)q
4) adb core application-binary
adb> c
abd>q
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 06:16 PM
тАО09-05-2005 06:16 PM
Re: Segmentation fault (core dumped)
debugger_application core_file exe_which produced_core
For detail have a look at
man gdb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 02:53 AM
тАО09-07-2005 02:53 AM
Re: Segmentation fault (core dumped)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 04:47 AM
тАО09-07-2005 04:47 AM
Re: Segmentation fault (core dumped)
$ gdb
(gdb) bt
When you load the core file into gdb, it will show exact source line or instruction that got the segfault.
It can be something like
*ptr = 10;
Where ptr is a pointer say like "int *ptr;"
Check what the value of ptr is by printing it.
(gdb) p ptr
and check if it is a valid address. Normally segfault happens when you derefernce an invalid address (like a NULL pointer). In that case, you need to make sure that you are accessing a valid address in your program before dereference it. Checking if a pointer if null before you derefernce it is always a good idea.
if (ptr != NULL)
*ptr = 10;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 04:55 AM
тАО09-07-2005 04:55 AM
Re: Segmentation fault (core dumped)
If you can, get in the debugger and put a trap at the beginning of every routine. You may have to take out some of the traps if a routine gets called a lot. But try to pin it down to a specific routine.