Hi,
Machine: M1 sonoma 14.1.1
At my test I am using macOS shipped lib of curl, and its default LibreSSL, that is:
curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1
I am getting memory leaks while running the following test:
void CallCurl() {
CURL *hnd;
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_URL, "https://www.google.com");
curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
}
I track the leaks with macOS instruments, and I see that all leaks are from libcrypto. The leaks are measured after curl_easy_cleanup.
Examples for the leaks stack frames:
serialize_ECPublicKey
ECDSA_do_verify_new
ossl_ecdsa_verify
EVP_DigestVerifyFinal
tls13_server_certificate_verify_recv
tls13_handshake_perform
tls13_legacy_connect
ossl_connect_common
ssl_cf_connect
cf_setup_connect
cf_hc_connect
Curl_conn_connect
multi_runsingle
curl_multi_perform
curl_easy_perform
CallCurl()
main
start
ccMallocECCryptor
CCECCryptorImportKey
ECDSA_do_verify_new
ossl_ecdsa_verify
EVP_DigestVerifyFinal
tls13_server_certificate_verify_recv
tls13_handshake_perform
tls13_legacy_connect
ossl_connect_common
ssl_cf_connect
cf_setup_connect
cf_hc_connect
Curl_conn_connect
multi_runsingle
curl_multi_perform
curl_easy_perform
CallCurl()
main
start
ccMallocECCryptor
CCECCryptorImportKey
ECDSA_do_verify_new
ossl_ecdsa_verify
EVP_DigestVerifyFinal
tls13_server_certificate_verify_recv
tls13_handshake_perform
tls13_legacy_connect
ossl_connect_common
ssl_cf_connect
cf_setup_connect
cf_hc_connect
Curl_conn_connect
multi_runsingle
curl_multi_perform
curl_easy_perform
CallCurl()
main
start
Any you familiar with memory leaks issues at curl that is shipped with macOS? Is there a workaround?
Thx,
Moshe.
Post
Replies
Boosts
Views
Activity
Hi,
When running with sudo, getResourceValue forKey:ubiquitousItemDownloadingStatusKey succeeds, but the value isn't populated (null). When running the function as a user, the value is populated as expected.
try url.getResourceValue(&value, forKey:URLResourceKey.ubiquitousItemDownloadingStatusKey)
Any advice?
Hi,
I am running the following code on macOS Sonoma m1.
rlimit rlp;
rlp.rlim_cur = 418299658239;
rlp.rlim_max = rlp.rlim_cur * 2;
int ret = setrlimit(RLIMIT_RSS, &rlp);
setrlimit fails with error 22 (EINVAL) when rlp.rlim_cur <= 418299658239.
I didn't see any documentation for this issue.
Is it a known limitation? Is there a workaround or another API to gain the same functionality, that is limiting the process memory?
I saw this failure also on macOS Ventura m1 if rlp.rlim_cur < 418299674624.
Thx,
Moshe.
Hi,
I see no endpoint security events when writing & reading to & from shared memory segments.
I used the following for accessing the shared memory:
fd = shm_open("/AAA", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
ftruncate(fd, 32)
addr = mmap(NULL, 32, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
Is there a way to monitor shm access?
Thx,
Moshe.