main() {char data[10000000];} crashes on alpha
Phil Edwards
pedwards@disaster.jaj.com
Thu Jan 25 17:04:00 GMT 2001
On Fri, Jan 26, 2001 at 12:16:17AM +0100, Matthias Klose wrote:
>
> falk@borkum:~/src/pq% cat bug.c
> int main() {
> char data[10000000];
>
> return 0;
> }
> falk@borkum:~/src/pq% gcc bug.c -o bug
> falk@borkum:~/src/pq% ./bug
> zsh: segmentation fault (core dumped) ./bug
>
> Slightly less, like 5000000, works ok.
Use whatever command is appropriate for your shell to find out what your
resource limits are set to for stack. For bash, it's "ulimit -s":
% ulimit -s
8192
%
So by default, once I use more than 8 megs of stack space, I crash.
System administrators usually put limits on per-user reasources so that
one person's process can't wedge an entire machine.
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.
More information about the Gcc-bugs
mailing list