Date: Tue, 5 May 1998 09:35:31 +0200 (CEST) From: Konrad Heuer <kheuer@gwdu60.gwdg.de> To: Doug Lo <jwlo@ms11.hinet.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: What does 'segment fault' mean? Message-ID: <Pine.BSF.3.96.980505091939.28449A-100000@gwdu60.gwdg.de> In-Reply-To: <354EA035.75EE752@ms11.hinet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 May 1998, Doug Lo wrote: > I'd be glad if anyone could explain one aspect of unix is puzzling me: > When I run some programs, it got an error: "Segment fault". > I don't know how/why it happened, would anyone tell me the 'Segment > fault' mean? A program running as a UNIX process uses different logical segments of the virtual address space. Under FreeBSD with the traditional a.out binaries there are following segments: - code segment (program code) - data segment (initialized data) - bss segment (uninitialized static data) - stack and heap segment (dynamic data) If a program calculates a bad data address and tries to use it this may cause a segemntation fault since the system protects segments against invalid access. For example, the code segement is read-only - it can't be modified by accidently storing data there. If the address is completely outside the process address space no access will be allowed to protect one process against the other. Konrad Heuer // Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH // Goettingen (GWDG), Am Fassberg, D-37077 Goettingen, Germany // // kheuer@gwdu60.gwdg.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980505091939.28449A-100000>