curl / Mailing Lists / curl-library / Single Mail

curl-library

Libcurl segmentation fault on arm/linux with pthread

From: Vikas Saroha <vikas_at_runizen.com>
Date: Thu, 9 Feb 2017 18:19:29 +0530

Hi there,

Need guidance to fix a segmentation fault that occurs after curl_easy_perform in a thread started using pthread, from the logs I can see that the response has been received and its during the write callback that the application crashes.

The segmentation fault does not occur in the main thread when the same code is executed.

I am trying to use libcurl to synchronize data from remote devices (Impinj R420 RFID readers). The devices are running Linux, Jesse.

Since the vendor does not provide a compatible libcurl version, we cross-compiled on a Ubuntu 14.04, 32 bit.

Confing options for compiling lib curl -

wget http://curl.haxx.se/download/curl-7.52.1.tar.gz
tar xzf curl-7.52.1.tar.gz

export ROOTDIR="${PWD}"

cd curl-7.52.1

export CROSS_COMPILE="arm-none-linux-gnueabi"
export AR=${CROSS_COMPILE}-ar
export AS=${CROSS_COMPILE}-as
export LD=${CROSS_COMPILE}-ld
export RANLIB=${CROSS_COMPILE}-ranlib
export CC=${CROSS_COMPILE}-gcc
export NM=${CROSS_COMPILE}-nm

./configure --prefix=${ROOTDIR}/build --target=${CROSS_COMPILE} --host=${CROSS_COMPILE} --build=i686-pc-linux-gnu --without-ssl --without-zlib

I am using the exact same code from the example - https://curl.haxx.se/libcurl/c/multithread.html.

Is there any pthread specific configuration that we are missing while compiling lib curl.

Best,

Vikas

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-09