Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline blacklist causes segfault since 7.54.1 #1584

pterjan opened this issue Jun 18, 2017 · 1 comment

Pipeline blacklist causes segfault since 7.54.1 #1584

pterjan opened this issue Jun 18, 2017 · 1 comment


Copy link

pterjan commented Jun 18, 2017

While debugging tests for perl-Net-Curl now failing, I could reproduce it in C:

#include <curl/multi.h>
int main() {
    CURLM *handle = curl_multi_init();
    char * bl[] = {"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
    curl_multi_setopt(handle, CURLMOPT_PIPELINING_SERVER_BL, bl);
    return 0;
==29767== Invalid free() / delete / delete[] / realloc()
==29767==    at 0x4C29060: free (vg_replace_malloc.c:530)
==29767==    by 0x4E6BCE2: Curl_llist_remove (llist.c:136)
==29767==    by 0x4E6BCE2: Curl_llist_destroy (llist.c:134)
==29767==    by 0x4E87AE1: Curl_pipeline_set_server_blacklist (pipeline.c:272)
==29767==    by 0x4E6D9F3: curl_multi_cleanup (multi.c:2256)
==29767==    by 0x400851: main (in /home/pterjan/co/perl-Net-Curl/BUILD/Net-Curl-0.37/a.out)
==29767==  Address 0x7a7b6c8 is 24 bytes inside a block of size 44 alloc'd
==29767==    at 0x4C27F66: malloc (vg_replace_malloc.c:299)
==29767==    by 0x4E87AA2: Curl_pipeline_set_server_blacklist (pipeline.c:282)
==29767==    by 0x4E6DD53: curl_multi_setopt (multi.c:2719)
==29767==    by 0x400845: main (in /home/pterjan/co/perl-Net-Curl/BUILD/Net-Curl-0.37/a.out)

$ curl -V
curl 7.54.1 (x86_64-mageia-linux-gnu) libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.7.0 nghttp2/1.9.2
Release-Date: 2017-06-14
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy 
@bagder bagder self-assigned this Jun 18, 2017
bagder added a commit that referenced this issue Jun 18, 2017
The list was freed incorrectly since the llist refactor of
cbae73e. Aded test 1550 to verify that it works and avoid future

Reported-by: Pascal Terjan

Fixes #1584
Copy link

bagder commented Jun 18, 2017

Thanks, the #1585 PR is my attempt at fixing this!

@bagder bagder closed this as completed in 6208547 Jun 19, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

2 participants