curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Help building proper debug version libcurl/7.29.0

From: Ali Ahmed via curl-library <>
Date: Wed, 1 Nov 2023 14:19:11 -0500

Hey guys,
I'm trying to build a debug version of libcurl to debug a seg fault issue.
The version of libcurl on the faulting system is:
libcurl version libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28

I have pulled the code from curl code from github and checked out the
7.29.0 tag (bf633a5).
I've built a version of libcurl with debug enabled via ./configure; however
whenever I attempt to add the debug symbols to gdb the wrong offsets are
used and the stack trace changes completely while debugging the core file

Q1) Can anyone tell me the options to pass into the configure script to
match the version on the faulting system?

Q2) Do I need to make sure the NSS, zlib, libidn, libssh2 libraries on the
debug build machine match the ones found on the faulting machine?

Ali Ahmed

stacktrace causing the crash for libcurl and libnss:

0 0x00007f47b77a2c4e in NSSRWLock_LockWrite_Util () from
#1 0x00007f47b7a3ec66 in STAN_InitTokenForSlotInfo () from
#2 0x00007f47b7a29db8 in SECMOD_UpdateSlotList () from /lib64/
#3 0x00007f47b7a29ef9 in secmod_UserDBOp () from /lib64/
#4 0x00007f47b7a2a539 in SECMOD_OpenNewSlot () from /lib64/
#5 0x00007f47b7a0d67f in secmod_ModuleInit () from /lib64/
#6 0x00007f47b7a0dc01 in secmod_LoadPKCS11Module () from /lib64/
#7 0x00007f47b7a1b720 in SECMOD_LoadModule () from /lib64/
#8 0x00007f47b7a1b855 in SECMOD_LoadModule () from /lib64/
#9 0x00007f47b79e0873 in nss_Init () from /lib64/
#10 0x00007f47b79e10f1 in NSS_InitContext () from /lib64/
#11 0x00007f47ba6989e3 in nss_init () from /lib64/
#12 0x00007f47ba698e60 in nss_connect_common () from /lib64/
#13 0x00007f47ba68fd8e in Curl_ssl_connect_nonblocking () from
#14 0x00007f47ba666f5d in Curl_http_connect () from /lib64/
#15 0x00007f47ba676965 in Curl_protocol_connect () from /lib64/
#16 0x00007f47ba68a12c in multi_runsingle () from /lib64/
#17 0x00007f47ba68a641 in curl_multi_perform () from /lib64/

Received on 2023-11-01