Segmentation fault

Kyle R. Rose krose at
Sun Feb 6 21:31:15 EST 2000

Hash: SHA1

Mark Donnelly <gimli at> writes:

> On Sun, 6 Feb 2000, Brad Noyes wrote:
> > I'm writing a c++ program that before i changed distributions from RH6.0, to
> > Mandrake worked. But now i try to run it i get a Segmentation fault when i
> > execute it with no core dump.
> Seg faults: the wonderful, wonderful sign of memory leaks.
> aaahhhh..

Not to be completely pedantic, but what you're describing is a
dangling pointer.  A memory leak occurs when you allocate memory and
forget to deallocate it.  A dangling pointer almost always causes a
segmentation fault on good operating systems; a memory leak never does
(unless your OS signals a segfault when you run out of memory; IIRC,
Linux glibc just returns a NULL on malloc, which _then_ causes a seg
fault if you try to use it without checking if it's NULL).


- -- 
Kyle R. Rose                    MIT LCS NE43-309, Cambridge, MA
11 Winslow Avenue Apt. 2        617-253-5883
Somerville, MA 02144            krose at

DeCSS and css-auth mirror:
See for details!

Linux is like living in a teepee.  No Windows, no Gates,
Apache in house.
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.5 and Gnu Privacy Guard <>

Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at (Subject line is ignored).

More information about the Discuss mailing list