Subject: Re: strange problem
To: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
From: Jaromír <jdolecek@netbsd.org>
List: tech-userlevel
Date: 06/03/2001 23:05:04
Emmanuel Dreyfus wrote:
> The following code produces a segmentation fault on PowerPC, m68k and
> i386. Anyone has an idea why?

I believe you hit stack size limit, which is 2MB on NetBSD by default.

Jaromir
 
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> 
> #define STACK_SIZE (2*1024*1024)
> 
> int main (int argc, char** argv) {
>         int res;
>         int sign = 0x66666666;
>         char altstack[STACK_SIZE];
> 
>         exit (0);
> }
> 
> 
> -- 
> Emmanuel Dreyfus.  
> Vous avez deplac_ la souris. 
> Windows NT doit maintenant redemarrer pour valider les modifications.
> p99dreyf@criens.u-psud.fr
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!