Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 16th, 2005, 2:47 AM   #1
Hellion
Newbie
 
Join Date: Mar 2005
Posts: 7
Rep Power: 0 Hellion is on a distinguished road
Seg fault?

Forgive my ignorance, but what exactly is a seg fault?
Hellion is offline   Reply With Quote
Old Mar 16th, 2005, 3:55 AM   #2
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 555
Rep Power: 5 Benoit is on a distinguished road
It means a program is trying to access memory outside it's address space, usually out of bound references
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Old Mar 19th, 2005, 4:47 PM   #3
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Specifically though SegFault tends to happen in Linux based operating systems, and probably a few others. In Windows you will get an error called an "Access Violation" or an "Illegal Operation", never a Segfault.
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Mar 19th, 2005, 5:08 PM   #4
Mad_guy
Hobbyist Programmer
 
Mad_guy's Avatar
 
Join Date: Oct 2004
Location: Sandstorm, Techno Club
Posts: 239
Rep Power: 4 Mad_guy is on a distinguished road
Send a message via AIM to Mad_guy Send a message via MSN to Mad_guy
Segmentation fault happens when the Operating system gets pointed to a confusing or non existant address on return from a subroutine or actually returning to the operating system itself.

For example, when a program calls a subroutine, on the stack, a special note is pushed, the RET address. Segmentation fault happens when the OS tries to read the RET point, and when it goes to the address an RET address specifies it doesn't exist in memory. So, segmentation fault is called. And the program is exited.

I could have explained it more in depth, but you should get the general idea.
Mad_guy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC