public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* stack probing on linux
@ 1999-11-09 16:43 Hong Zhang
  1999-11-09 23:50 ` Martin Kahlert
  1999-11-30 23:28 ` Hong Zhang
  0 siblings, 2 replies; 4+ messages in thread
From: Hong Zhang @ 1999-11-09 16:43 UTC (permalink / raw)
  To: help-gcc

Recently I tried a simple program as follows:

void foo() {
  int buf[10000];
  printf("Hello");
}

When this program is compiled on Linux, the gcc
does not generate stack probing (banging) code.
In case the program run out of stack, this code
will destroy the memory space (possible another
stack space) that precedes the current stack
(assuming the stack is growing downwars).


Does anyone know why the gcc does not generate
stack probing code on Linux. Thanks in advance.

Hong Zhang

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

* Re: stack probing on linux
  1999-11-09 16:43 stack probing on linux Hong Zhang
@ 1999-11-09 23:50 ` Martin Kahlert
  1999-11-30 23:28   ` Martin Kahlert
  1999-11-30 23:28 ` Hong Zhang
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Kahlert @ 1999-11-09 23:50 UTC (permalink / raw)
  To: help-gcc

In article <80aerl$o8q$1@engnews2.eng.sun.com>,
	Hong Zhang <hzhang@eng.sun.com> writes:
> Recently I tried a simple program as follows:
> 
> void foo() {
>   int buf[10000];
>   printf("Hello");
> }
> 
> When this program is compiled on Linux, the gcc
> does not generate stack probing (banging) code.
> In case the program run out of stack, this code
> will destroy the memory space (possible another
> stack space) that precedes the current stack
> (assuming the stack is growing downwars).
> 
If this program runs out of stack, you made anything
wrong with your shell. Try man limit or man ulimit.

If there is no more stack space, nothing gets overwritten,
you only will get a segmentation fault.

Bye,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.

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

* stack probing on linux
  1999-11-09 16:43 stack probing on linux Hong Zhang
  1999-11-09 23:50 ` Martin Kahlert
@ 1999-11-30 23:28 ` Hong Zhang
  1 sibling, 0 replies; 4+ messages in thread
From: Hong Zhang @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

Recently I tried a simple program as follows:

void foo() {
  int buf[10000];
  printf("Hello");
}

When this program is compiled on Linux, the gcc
does not generate stack probing (banging) code.
In case the program run out of stack, this code
will destroy the memory space (possible another
stack space) that precedes the current stack
(assuming the stack is growing downwars).


Does anyone know why the gcc does not generate
stack probing code on Linux. Thanks in advance.

Hong Zhang

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

* Re: stack probing on linux
  1999-11-09 23:50 ` Martin Kahlert
@ 1999-11-30 23:28   ` Martin Kahlert
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Kahlert @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

In article <80aerl$o8q$1@engnews2.eng.sun.com>,
	Hong Zhang <hzhang@eng.sun.com> writes:
> Recently I tried a simple program as follows:
> 
> void foo() {
>   int buf[10000];
>   printf("Hello");
> }
> 
> When this program is compiled on Linux, the gcc
> does not generate stack probing (banging) code.
> In case the program run out of stack, this code
> will destroy the memory space (possible another
> stack space) that precedes the current stack
> (assuming the stack is growing downwars).
> 
If this program runs out of stack, you made anything
wrong with your shell. Try man limit or man ulimit.

If there is no more stack space, nothing gets overwritten,
you only will get a segmentation fault.

Bye,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.

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

end of thread, other threads:[~1999-11-30 23:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-09 16:43 stack probing on linux Hong Zhang
1999-11-09 23:50 ` Martin Kahlert
1999-11-30 23:28   ` Martin Kahlert
1999-11-30 23:28 ` Hong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).