public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chandler <chandler@grammatech.com>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Bug Report: Dereferencing a bad pointer
Date: Thu, 08 Nov 2001 10:29:19 -0500	[thread overview]
Message-ID: <3BEAA4CF.3B32515F@grammatech.com> (raw)
In-Reply-To: <3BE9C261.D7422143@grammatech.com> <20011107184018.A6483@redhat.com>

Benjamin LaHaise wrote:

> On Wed, Nov 07, 2001 at 06:23:13PM -0500, David Chandler wrote:
> > The following one-line C program, when compiled by gcc 2.96 without
> > optimization, should produce a SIGSEGV segmentation fault (on a machine
> > with 3 or less gigabytes of virtual memory, at least):
> >
> >         int main() { int k  = *(int *)0xc0000000; }
> >
> > However, it does not do so under 2.4.x -- it does cause a seg fault
> > under
> > 2.2.x kernels.
>
> Works here running 2.4.13-ac8+bits.  Are you sure you didn't compile with
> optimization enabled?
>
>                 -ben

I'm quite sure -- an optimized build exits immediately, whereas I'm seeing a
hung process with 2.4 kernels that has to be killed (most any signal,
including SIGSEGV, will do the trick).  With 2.2 kernels, the program seg
faults, as it should.  By "Works here" I assume you mean that you received a
segmentation fault.

I get the same result with gcc 3.0.1 and gcc 2.96 (and yes, the relevant
generated code differs slightly).  I have tried Linus's official 2.4.13+UML
on UML, but I've not tried 2.4.13-ac8.

Please Cc: me on any replies.


David Chandler

_____
David L. Chandler.                              GrammaTech, Inc.
mailto:chandler@grammatech.com         http://www.grammatech.com




  reply	other threads:[~2001-11-08 15:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-07 23:23 Bug Report: Dereferencing a bad pointer David Chandler
2001-11-07 23:40 ` Benjamin LaHaise
2001-11-08 15:29   ` David Chandler [this message]
2001-11-08 16:02     ` Richard B. Johnson
2001-11-08 17:17       ` David Chandler
2001-11-08 21:32         ` Richard B. Johnson
2001-11-08 21:57           ` David Chandler
2001-11-08 22:39             ` Brian Gerst
2001-11-08 23:15               ` David Chandler
2001-11-09 13:33             ` Richard B. Johnson
2001-11-08 17:53       ` Tahar
2001-11-08 16:27     ` Benjamin LaHaise
2001-11-08 18:02       ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BEAA4CF.3B32515F@grammatech.com \
    --to=chandler@grammatech.com \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox