cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Buildroot - libCurl/cURL Segmentation Fault

From: rahul bajaj <aussie.kang82_at_gmail.com>
Date: Tue, 25 May 2010 20:58:22 -0700

Go through the sample code on the libcurl site again.

On Tue, May 25, 2010 at 3:08 PM, Conan Huang (Intern) <
conan.huang_at_autodesk.com> wrote:

> Hi all,
>
>
>
> I’m fairly new to libcURL/cURL and buildroot. I recently built a
> kernel image for Phidget SBC (which uses a using ARM920t) using Buildroot.
> In Buildroot I configured to install cURL and libcURL (Buildroot installed
> cURL 7.17.1). After loading the kernel image on the Phidget SBC everything
> looks fine, cURL exists, libcURL exist. I started to test cURL and libcURL,
> both crashes with segmentation fault or illegal instruction.
>
>
>
> What I did is I ran the simple.c code from cURl.haxx example codes .
> Instead of the default URL I changed it to google.com here is the output:
>
>
>
> <HTML><HEAD><meta http-equiv="content-type"
> content="text/html;charset=utf-8">
> <TITLE>301 Moved</TITLE></HEAD><BODY>
> <H1>301 Moved</H1>
> The document has moved
> here.
> </BODY></HTML>
> Segmentation fault
>
>
>
> Sometimes instead of Segmentation fault, the error would be Illegal
> Instruction.
>
>
>
> Simple.c:
>
>
>
> #include "phidget21.h"
>
> #include "curl/curl.h"
>
>
>
> int main(int argc, char* argv[])
>
> {
>
> CURL *curl;
>
> CURLcode res;
>
>
>
> curl = curl_easy_init();
>
> if(curl) {
>
> curl_easy_setopt(curl, CURLOPT_URL, "
> http://google.ca");
>
> res = curl_easy_perform(curl);
>
>
>
> /* always cleanup */
>
> curl_easy_cleanup(curl);
>
> }
>
>
>
> return 0;
>
> }
>
>
>
>
>
>
>
> When I tried cURL in Putty (ssh), similar result:
>
>
>
> curl google.ca
> <HTML><HEAD><meta http-equiv="content-type"
> content="text/html;charset=utf-8">
> <TITLE>301 Moved</TITLE></HEAD><BODY>
> <H1>301 Moved</H1>
> The document has moved
> here.
> </BODY></HTML>
> Illegal instruction
>
>
>
>
>
> I’m not sure if there is any compatibility issues with Buildroot, ARM
> or cURL. OR if there is any bypass or solutions.
>
>
>
>
>
> Thank you all for any support.
>
>
>
>
>
> Regards,
>
>
>
>
>
> Conan
>
>
>
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-26