[gnutls-devel] GnuTLS | doc: discourage use of gnutls_malloc/gnutls_free by applications (!2032)
    Read-only notification of GnuTLS library development activities 
    gnutls-devel at lists.gnutls.org
       
    Wed Oct 29 14:25:59 CET 2025
    
    
  
Daniel P_ Berrangé commented on a discussion: https://gitlab.com/gnutls/gnutls/-/merge_requests/2032#note_2853309094
> while we made gnutls_global_set_mem_functions a no-op, we haven't promised that the library is using the system malloc everywhere.
AFAICT, gnutls has made exactly that promise:
https://man7.org/linux/man-pages/man3/gnutls_global_set_mem_functions.3.html
"By default the libc's allocation functions
 (malloc(), free()), are used by gnutls, to allocate both sensitive
 and not sensitive data.  This function is provided to set the
 memory allocation functions to something other than the defaults"
That is saying that GNUTLS will always use the system allocator unless gnutls_global_set_mem_functions has been called. Since that is now a no-op, GNUTLS has guaranteed that it always uses the system allocator.
-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2032#note_2853309094
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20251029/6212d05d/attachment.html>
    
    
More information about the Gnutls-devel
mailing list