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 15:58:34 -0500

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?

Marshall

Dan Fandrich wrote:
> On Fri, Jul 28, 2006 at 02:44:58PM -0500, Marshall Crocker wrote:
>
>> I have an embedded system that I have cross compiled and installed curl
>> on. The command line tool works fine and I can use the curl library
>> from my application. I run into a problem when I link the pthreads
>> library to my multithreaded app.
>>
>> When I link with -lpthread and -lcurl, I get the error:
>>
>> stack smashing detected: Segmentation fault
>>
>
> How big is your stack? There are a couple places where curl uses some pretty
> big stack buffers, and enabling threading might just push you over the
> limit.
>
>
>>>> Dan
>>>>
Received on 2006-07-28