Stack limits

Stack limits

Post by Prof A Olowofoyeku (The African Chi » Wed, 25 Jul 2001 19:20:49



Hi all

Is there a way to increase the stack limit available to applications
(to prevent stack overflows)? "ulimit" under bash does not permit a
stack limit of more than 10mb - can this be circumvented (either at
system, shell or application level?). Thanks all.

Best regards, The Chief
-----------------------
Prof. A*la Olowofoyeku (The African Chief)
(Author of Chief's Installer Pro for Win32)

  Web: http://www.veryComputer.com/~african_chief/

 
 
 

Stack limits

Post by Kasper Dupon » Wed, 25 Jul 2001 19:40:41



Quote:

> Hi all

> Is there a way to increase the stack limit available to applications
> (to prevent stack overflows)? "ulimit" under bash does not permit a
> stack limit of more than 10mb - can this be circumvented (either at
> system, shell or application level?). Thanks all.

There are two sets of limits, the hard limits
and the current limits.

The current limits are also sometimes called
he soft limits.

You are allowed to change the current limits,
but they may not be set higher than the hard
limits.

You are also allowed to change the hard
limits, every process may decrease its hard
limits, but only root may increate hard
limits.

Usually the hard stack limit is set to
"unlimited". But a system administrator can
change that if he wants to.

In bash you can type "ulimit -Sa" or
"ulimit -a" to see the current limits. You
can type "ulimit -Ha" to see the hard limits.

--
Kasper Dupont

 
 
 

Stack limits

Post by Prof A Olowofoyeku (The African Chi » Wed, 25 Jul 2001 22:46:57


On Tue, 24 Jul 2001 10:40:41 +0000, Kasper Dupont



>> Hi all

>> Is there a way to increase the stack limit available to applications
>> (to prevent stack overflows)? "ulimit" under bash does not permit a
>> stack limit of more than 10mb - can this be circumvented (either at
>> system, shell or application level?). Thanks all.

>There are two sets of limits, the hard limits
>and the current limits.

[...]

Thanks very much for the information!

Best regards, The Chief
-----------------------
Prof. A*la Olowofoyeku (The African Chief)
(Author of Chief's Installer Pro for Win32)

  Web: http://www.veryComputer.com/~african_chief/

 
 
 

1. Stack limit

The stack limit is set in the
/usr/src/linux/include/asm-alpha/resources.h

I found that the definition was corrected in some architectures.
But for alpha the limit is set wrong.
Where sould I contact to correct the file?

I will show the grep result of _STK_LIM in the 2.2.14 source.

asm-alpha/resource.h:    {_STK_LIM, _STK_LIM},                  /* RLIMIT_STACK */      \
asm-arm/resource.h:     { _STK_LIM, _STK_LIM },                         \
asm-i386/resource.h:    { _STK_LIM, LONG_MAX },                         \
asm-m68k/resource.h:  {_STK_LIM, LONG_MAX}, \
asm-mips/resource.h:    {_STK_LIM, _STK_LIM},                           \
asm-ppc/resource.h:    {_STK_LIM, LONG_MAX},                    /* RLIMIT_STACK */      \
asm-s390/resource.h:    { _STK_LIM, LONG_MAX },                         \
asm-sparc/resource.h:    {LONG_MAX, LONG_MAX}, {_STK_LIM, LONG_MAX},           \
asm-sparc64/resource.h:    {LONG_MAX, LONG_MAX}, {_STK_LIM, LONG_MAX},         \
asm/resource.h:    {_STK_LIM, _STK_LIM},                        /* RLIMIT_STACK */      \

The RLMIIT_STACK sould _STK_LIM, LONG_MAX but in some architectures

The RLMIIT_STACK sould _STK_LIM, LONG_MAX but in some architectures
it is _STK_LIM,_STK_LIM.
It forces users not to use more than 8MB of stack area.

Thank you in advance,

Naohiko Shimizu
Dept. Communication Engr./Univ. TOKAI.
1117 Kitakaname Hiratsuka 259-12 Japan
TEL.+81-463-58-1211(ext. 4084) FAX.+81-463-58-8320
<URL http://shimizu-lab.et.u-tokai.ac.jp/>

2. Request for info. on parallel port and driver _input_ capability

3. Kernel stack limit?

4. Netscape 2.0, Linux and News Groups

5. 8 Mo stack limit per process

6. partitions not cleanly unmounted with 2.1.5x kernels

7. Kernel Stack Limit...

8. Finding the pid of the running process?

9. stack limit for users

10. How to increase the stack limit for a process?

11. stack limit:...

12. Netscape Enterprise server child stack limit

13. How to increase stack limit for CGI Script