[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 01:40:35 CET 2025




Daiki Ueno commented: https://gitlab.com/gnutls/gnutls/-/merge_requests/2032#note_2851718595


I'm not sure if I agree with this approach; while we made `gnutls_global_set_mem_functions` a no-op, we haven't promised that the library is using the system malloc everywhere. I'd rather suggest turning the pointer indirection to a regular function symbol with symbol versioning, like !2033. With that patch applied, the problem seems to disappear:

```console
$ libtool --mode=compile --tag=CC clang -fsanitize=cfi-icall  -flto -Wall -I./lib/includes -o g.lo -c g.c
$ libtool --mode=link --tag=CC clang -fsanitize=cfi-icall  -flto -Wall -o g g.lo lib/libgnutls.la
$ ./g
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2032#note_2851718595
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/84455c01/attachment-0001.html>


More information about the Gnutls-devel mailing list