cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: segfault with gzip encoding support

From: Vikram <vvikram_at_stanford.edu>
Date: Wed, 24 Dec 2003 12:02:32 -0800 (PST)

> You're using the default stack size in that sample code. It's probably
> different on FreeBSD vs. Linux, which is why it works on the one but not
> the other. Try using pthread_attr_setstacksize() to set a large stack
> (try at least 128 KiB to be safe) for each thread and see if that helps.

You are right. I set the stacksize using pthread_atter_setstacksize to
(128*1024) and it works.

I further experimented with the stack size. Surprising that 65536
[64*1024] doesn't work and segfault but anything greater than that works
[including 65537...]. Why is this?

> Also, make sure you're linking with a thread safe libc.

Yes. I do this; links with libc_r in freebsd.

Thanks for your help.
                        Vikram

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-24