Skip to content

Segmentation fault using libcurl to perform an IDLE command in IMAP #747

@ehlertjd

Description

@ehlertjd

I did this

  1. Create an IMAP connection using CURLOPT_CONNECT_ONLY.
  2. Using curl_easy_send and curl_easy_receive, select the INBOX and perform an IDLE command
  3. Send a DONE command and call curl_easy_cleanup
  4. Program aborts with a segfault

frame #0: 0x0000000100033d59 libcurl.4.dylib:imap_endofresp + 245'
frame #1: 0x00000001000374c0 libcurl.4.dylib:Curl_pp_readresp + 480
frame #2: 0x0000000100033b06 libcurl.4.dylib:imap_statemach_act + 2045
frame #3: 0x0000000100034758 libcurl.4.dylib:imap_block_statemach + 42
frame #4: 0x00000001000332b7 libcurl.4.dylib:imap_disconnect + 75
frame #5: 0x0000000100019653 libcurl.4.dylib:Curl_disconnect + 103
frame #6: 0x000000010002c55c libcurl.4.dylib:curl_multi_cleanup + 78
frame #7: 0x0000000100014668 libcurl.4.dylib:Curl_close + 60
frame #8: 0x0000000100000d10 test_imap_connect_only:main + 368
frame #9: 0x00007fff90ed15ad libdyld.dylib:start + 1
frame #10: 0x00007fff90ed15ad libdyld.dylib:start + 1

Sample program that crashes here:
imap_idle.cpp

I expected the following

Program should not crash, connection cleanup should occur cleanly.

curl/libcurl version

7.48.0

operating system

OSX 10.11

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