Skip to content

using CURL_LOCK_DATA_COOKIE to share cookies causes crashes #17774

@afengsoft

Description

@afengsoft

I did this

Since version 8.11.1, starting from 8.12, using CURL_LOCK_DATA_COOKIE to share cookies causes crashes. There were no issues before 8.11.1. Even after setting the lock, it still crashes the same way.

        curl_share_setopt(g_share_handle, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
        curl_share_setopt(g_share_handle, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
        curl_share_setopt(g_share_handle, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);

        curl_share_setopt(g_share_handle, CURLSHOPT_LOCKFUNC, (LOCK)lockFunc);
        curl_share_setopt(g_share_handle, CURLSHOPT_UNLOCKFUNC, (UNLOCK)unlockFunc);
        curl_share_setopt(g_share_handle, CURLSHOPT_USERDATA, &g_curlMutex);

I expected the following

No response

curl/libcurl version

curl 8.14.1

operating system

windows11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions