Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2000 17:13:25 +0100
From:      Martin Cracauer <cracauer@cons.org>
To:        Mirko Viviani <mirko.viviani@rccr.cremona.it>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: libobjc and stack problems. (really libc_r and stack size)
Message-ID:  <20000322171325.B18834@cons.org>
In-Reply-To: <200003220814.JAA01602@next.procom2.it>; from mirko.viviani@rccr.cremona.it on Wed, Mar 22, 2000 at 09:03:47AM %2B0100
References:  <200003220814.JAA01602@next.procom2.it>

next in thread | previous in thread | raw e-mail | index | archive | help
Hai,

In <200003220814.JAA01602@next.procom2.it>, Mirko Viviani wrote: 
> Ciao.
> 
> Is it possible to apply the gnu/17433 patch before the 4.0-STABLE ?
> 
> Related to this I'm excepting some strange behaviour with prgs linked with libc_r
> under 3.4 and I would like to know if they are also in 4.0.

[please break lines at < 80 chars, thanks]

> 1. In a prg linked with libc I can use a local buffer up to 65 MB, but if the same is
>    linked with libc_r I can use up to 1 MB buffer else it fails with a seg fault.
>    (char buf[60 * 1024])
>    Why ?

I assume this is function-local stack space? if not, please post a
compilable test program.

> 2. The same thing apply to pthread, that apart from the ridicolously small (posix specs ?)
>    initial default value of 65 kb the stack can't grown.
>    Why ?

I don't think anyone came up with a solution to provide growable
stacks in threads. 

Stacks in plain processes can grow, because the next allocated thing
is the heap on the other end of the address space.

You can't do this for threads, you have to choose a distance, you have
to device your address space. Large default stacks limit the heap
considerably on a 32 bit machine. They will also not solve, but shift
the problem.

So it's better to have a small limit so that application programmer
either use small stack amounts or when that fails think over their
choice. But we cannot make a good guess without hints from the
application. 

> Thanks to libobjc and the first problem it's nearly impossible to
> run GNUstep prgs with -pthread support. It there a way to fix ?

Use pthread_attr_setstacksize()

> It's not possible to have contrib/gdb shipped with objective-c
> language patches ?

Can you point me to the newest set of ObjC patches for gdb, please?

I don't think they will it into the base system, mainly because it
takes off files from the vendor branch. But we also have a gdb in
ports, where patches are more welcome.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer/
  Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000322171325.B18834>