cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Stack smashed when linked with pthreads

From: Marshall Crocker <marshall_at_iconux.org>
Date: Fri, 28 Jul 2006 18:02:30 -0500

Doh! I was thinking of the kernel stack. Yes an 8K stack is very small
for a user space stack. I guess I need to go to the uClibc config to
figure out what the user space stack size is set to.

Marshall

Dan Fandrich wrote:
> On Fri, Jul 28, 2006 at 03:58:34PM -0500, Marshall Crocker wrote:
>
>> Hmm...that may be it. I'm not exactly sure of my stack size but I am
>> using the linux-tiny patches for the 2.6 kernel which may very well
>> reduce the size below the default 8K. I assume 8K would be big enough
>> to handle curl and pthreads right?
>>
>
> 8K is very small. There is at least one place in the curl app where a 64K
> buffer is put onto the stack, and I wouldn't be surprised if there are
> buffers in the KB range in libcurl. Some of the call stacks can get pretty
> deep, so I'd be surprised if you *didn't* see stack overflows at 8K.
>
>
>>>> Dan
>>>>
Received on 2006-07-29