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.

Re: libcurl.dll 7.84.0 and higher causes a memory ACCESS_VIOLATION error.

From: Ray Satiro via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 1 Nov 2022 00:28:36 -0400

On 10/31/2022 11:13 AM, Patrick Vansevenant via curl-library wrote:
>
>
> We have been using libcurl.dll for a few years to do almost all our
> HTTP/HTTPS requests in our OpenEdge 11.7 environment (= our custom ERP
> solution).
> For more info about OpenEdge 11.7 see :
> https://www.progress.com/openedge/whats-new-11-7.
>
>
> When libcurl.dll 7.84.0 or higher is used in an OpenEdge 11.7 session,
> then the OpenEdge session crashes when the libcurl.dll is released
> from memory.
>
> A .protrace file is generated with the following error :
>
> */Exception code: C0000005 ACCESS_VIOLATION/*
>
>
> With the following small test OpenEdge program (test_libcurl.p) we are
> able to reproduce the issue :
>
>
> /* ***************************  Definitions  ************************** */
>
> block-level on error undo, throw.
>
> /* ********************  Preprocessor Definitions  ******************** */
>
> procedure curl_global_init external "libcurl.dll" cdecl:
>   define input  parameter i-init   as long.
>   define return parameter p-Return as long.
> end procedure.
>
> procedure curl_global_cleanup external "libcurl.dll" cdecl:
> end procedure.
>
> /* ***************************  Main Block  *************************** */
> log-manager:logfile-name = "C:\OpenEdge\WRK117\test_libcurl.log".
>
> &GLOBAL-DEFINE CURL_GLOBAL_NOTHING   0
> &GLOBAL-DEFINE CURL_GLOBAL_SSL        1
> &GLOBAL-DEFINE CURL_GLOBAL_WIN32      2
> &GLOBAL-DEFINE CURL_GLOBAL_ALL ({&CURL_GLOBAL_SSL} + {&CURL_GLOBAL_WIN32})
> &GLOBAL-DEFINE CURLE_OK               0
>
> define variable iReturn     as integer no-undo.
> define variable iCurlHandle as integer no-undo.
>
> run *curl_global_init*(input {&CURL_GLOBAL_ALL}, output iReturn).
>
> log-manager:write-message(substitute("curl_global_init returned &1.",
> iReturn)).
>
> run *curl_global_cleanup*.
>
> log-manager:close-log().
>
>
> We experience no issues with libcurl.dll 7.83.1 and lower.
>
> Any idea how we can solve the above issue ?
>

curl_global_init return value is int not long type. See if you can
reproduce in C.


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-11-01