cURL / Mailing Lists / curl-library / Single Mail


Re: segfault in libcurl using uclibc

From: Daniel Stenberg <>
Date: Thu, 15 Apr 2010 11:17:38 +0200 (CEST)

On Wed, 14 Apr 2010, James Story wrote:

> To cut a long story short I tweaked my "hello curl" application to directly
> mimic what was being set and passed off to "getaddrinfo" from the call into
> libcurl. I found that setting the ai flag to "AI_CANONNAME" caused my test
> app to also segfault and crash so by commenting out that flag setting on
> line 164 of hostip4.c everything seems to be up and running. I would assume
> that this is classed as a kernel bug/uclibc bug?

I would assume that's a uclibc bug (which isn't the same as the kernel), yes.
I googled around and I spotted that uclibc has had several problems with
getaddrinfo in the past so possibly you can already upgrade to a later, fixed

> - Yep - I managed to get gdbserver running on the embedded side. That's how
> I got the initial stack dump... are there any other tools you would
> recommend for debugging applications in the Linux/embedded Linux world?

I always recommend valgrind for user-space Linux development, but
unfortunately that isn't available for ARM and I advice you to do as much
development as possible in x86 so that you can track down problems easier
there, and then move the code over to target when you have faith in it. From
what I hear people tend to use mpatrol in systems without valgrind, so it
might be a good idea for hunting memory problems on target.

strace is of course a simple and very useful tool even for target.

List admin:
Received on 2010-04-15