Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: David Alan Gilbert <dg@treblig.org>
To: axp-list@redhat.com
Subject: Re: Random sig[segv|fpe] on 164LX with 256MB RAM
Date: Wed, 23 Sep 1998 11:10:33 +0100	[thread overview]
Message-ID: <3608C919.84F1DA98@treblig.org> (raw)
In-Reply-To: Pine.3.89.9809221929.A23955-0100000@ctpa01.mit.edu

Dam Thanh Son wrote:
> 
> On Tue, 22 Sep 1998, Andrew Hobgood wrote:
> 
> > schizo:~# gcc -o memtest memtest.c
> > schizo:~# ./memtest
> > Filling with seed of s=0x420
> > memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
> > Segmentation fault (core dumped)

> memtest: memory violation at pc=12000093c rp=120000904 (bad address =
> 00000000)
> 
> Is it a hardware or a software issue??

STOP! STOP!!!

This is failing because it has failed to allocate the amount of memory its
asked for (Note to me for the future: Don't post programs you hacked together
for yourself to maillists without putting simple checks in...)

Just check what hte malloc is returning, if its returning NULL then its failed;
turn down that nice friendly SIZE parameter at the top.

If the memory test fails it will print a pair of values, the value it expected
and the value it got back with a big furry error about comparison failing.

Dave
-- 
----------------------------------------------------------------------
- Dr. David Alan Gilbert - WARNING! This is a beta release .signature-
- Work:    dg @ cogency.co.uk        - +44-(0)161-428-9444           -
- Home:    gro.gilbert @ treblig.org -                               -
----------------------------------------------------------------------


  parent reply	other threads:[~1998-09-23 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-22  6:07 Random sig[segv|fpe] on 164LX with 256MB RAM Andrew Hobgood
1998-09-22 12:39 ` Dave Gilbert
1998-09-22 17:25   ` Andrew Hobgood
1998-09-22 17:28     ` Andrew Hobgood
1998-09-23  0:04     ` Dam Thanh Son
1998-09-23  4:27       ` Michal Jaegermann
1998-09-23  6:49         ` Peter Rye
1998-09-23 10:10       ` David Alan Gilbert [this message]
1998-09-23 15:27         ` Andrew Hobgood
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox