All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrei A. Voropaev" <av@simcon-mt.com>
To: linux-kernel@vger.kernel.org
Subject: PROBLEM: large auto variables cause segfault under 2.6
Date: Tue, 5 Oct 2004 15:27:41 +0200	[thread overview]
Message-ID: <20041005132741.GD28160@avorop.local> (raw)

Declaring very large auto variables cause segfaults in the program under
2.6 kernel.

Take a look at this program.

  int main( int argc, char **argv )
  {
       unsigned char  bRet = 0;
  
       char tst[67123456];
  
  
       const char* pcSupportedParams = "d:t:lV:C:cP:h";
  
       printf("pcSupportedParams = %s\n");
       return 0;
  }

When compiled it produces segfault under kernel 2.6.8.1. The problem is
with that large array. Under 2.4 kernel the program gets its memory
region automatically extended to accomodate for large auto variables.
Under 2.6 it gets segment violation signal.

             reply	other threads:[~2004-10-05 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 13:27 Andrei A. Voropaev [this message]
2004-10-05 13:40 ` PROBLEM: large auto variables cause segfault under 2.6 Arjan van de Ven
2004-10-05 13:47   ` Andrei A. Voropaev
2004-10-07 15:05 ` Tonnerre

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=20041005132741.GD28160@avorop.local \
    --to=av@simcon-mt.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.