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: Patrick Vansevenant via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 1 Nov 2022 17:59:30 +0100

Hi Ray,

I have tried the following :

procedure curl_global_init external "libcurl.dll" cdecl:
  define input parameter i-init as long.
  define return parameter p-Return as* integer.*
end procedure.

But that throws the following error in OpenEdge : "*DLL datatype must be
one of CHARACTER, BYTE, SHORT, UNSIGNED-SHORT, LONG, FLOAT, or DOUBLE
(3383)"*.

I have tried with SHORT and BYTE as return parameter too. But I experience
the same issues as with LONG.

We have also written a C++ program and there indeed, there we don't
encounter any issues.


Kind regards,
Patrick
---
Op di 1 nov. 2022 om 05:29 schreef Ray Satiro via curl-library <
curl-library_at_lists.haxx.se>:
> 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
>
-- 
**** DISCLAIMER 
<https://media.tvh.com/content/pdf/various/Email-disclaimer.pdf> ****
This 
message is delivered to all addressees subject to the conditions set forth 
in the attached disclaimer, which is an integral part of this message. Your 
privacy is important to us. We use your personal data only in compliance 
with data protection laws. For further information on how we process your 
personal data, please consult our Privacy Policy 
<https://www.tvh.com/privacy-policy>. By communicating with us, you 
unambiguously consent to our use of your personal data as explained in the 
Privacy Policy. The information contained in this communication may be 
confidential and may be subject to the attorney-client privilege.


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