cURL / Mailing Lists / curl-library / Single Mail

curl-library

Stack smashed when linked with pthreads

From: Marshall Crocker <marshall_at_iconux.org>
Date: Fri, 28 Jul 2006 14:44:58 -0500

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

I do not get this error if I compile with only -lpthread or only -lcurl.
The entire embedded os (a custom version of aspisos) is compiled with
-fstack-protector-all so that's why I'm seeing the stack smashing error
message. I have compiled curl with --enable-thread and have tried
compiling curl with and without -fstack-protector-all and get the same
result.

Any ideas what the problem could be? I don't have any problems when I
link to the gpsd library and pthreads so it appears it's a curl specific
problem but I could be wrong.

Marshall
Received on 2006-07-28