Thanks to visit codestin.com
Credit goes to github.com

Skip to content

the libcurl crash,when the url is invalid  #1179

@41405465

Description

@41405465

[ There are collections of known issues to be aware of:
https://curl.haxx.se/docs/knownbugs.html https://curl.haxx.se/docs/todo.html ]

I did this

const char *url = "https://www.xxxasfd.com:88755";
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_perform(curl);

if the url is invalid(“https://www.xxxasfd.com:88755”),the program crasees!
but if the url is valid("https://www.baidu.com"),the program running normally!
Hope you can solve this problem!

core detail

Program terminated with signal 11, Segmentation fault.
#0  0x00007fc97f47df2e in curl_multi_perform () from ./notice.so
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.x86_64 keyutils-libs-1.4-4.el6.x86_64 krb5-libs-1.10.3-10.el6.x86_64 libcom_err-1.41.12-14.el6.x86_64 libgcc-4.4.7-3.el6.x86_64 libselinux-2.0.94-5.3.el6.x86_64 libstdc++-4.4.7-3.el6.x86_64 mysql-libs-5.1.66-2.el6_3.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64 openssl-1.0.0-27.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) where
#0  0x00007fc97f47df2e in curl_multi_perform () from ./notice.so
#1  0x63656e6e6f63206f in ?? ()
#2  0x323731206f742074 in ?? ()
#3  0x2e3332322e36322e in ?? ()
#4  0x74726f7020313332 in ?? ()
#5  0x43203a3233393920 in ?? ()
#6  0x6f697463656e6e6f in ?? ()
#7  0x657375666572206e in ?? ()
#8  0x0000000000000064 in ?? ()
#9  0x0000000000000000 in ?? ()

curl/libcurl version

[curl -V output perhaps?]
curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2j zlib/1.2.3 c-ares/1.12.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

operating system

[chengd@CC-DEV01 bin]$ uname -a
Linux CC-DEV01 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22 18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
[chengd@CC-DEV01 bin]$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.4
Release: 6.4
Codename: n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions