mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PROBLEM: large auto variables cause segfault under 2.6
@ 2004-10-05 13:27 Andrei A. Voropaev
  2004-10-05 13:40 ` Arjan van de Ven
  2004-10-07 15:05 ` Tonnerre
  0 siblings, 2 replies; 4+ messages in thread
From: Andrei A. Voropaev @ 2004-10-05 13:27 UTC (permalink / raw)
  To: linux-kernel

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-07 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05 13:27 PROBLEM: large auto variables cause segfault under 2.6 Andrei A. Voropaev
2004-10-05 13:40 ` Arjan van de Ven
2004-10-05 13:47   ` Andrei A. Voropaev
2004-10-07 15:05 ` Tonnerre

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

Powered by JetHome