[gnutls-devel] GnuTLS | build: use valgrind client request to detect undefined memory use (!1228)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Apr 4 06:11:41 CEST 2020




Daiki Ueno commented on a discussion on configure.ac: https://gitlab.com/gnutls/gnutls/-/merge_requests/1228#note_317552481

>  dnl We use its presence to detect C11 threads
>  AC_CHECK_HEADERS([threads.h])
>  
> +AC_CHECK_HEADERS([valgrind/memcheck.h])

I would rather enable it unconditionally, given the cost is negligible:
```
18:59 >ueno< thanks; is there any performance penalty if I unconditionally instrument a program with VALGRIND_MAKE_MEM_UNDEFINED
18:59 >ueno< like https://gitlab.com/gnutls/gnutls/-/merge_requests/1228/diffs
19:00 =mjw= Nothing is zero cost, but it is really minimal.
19:01 =mjw= It inserts some instructions that are basically NOPs, but that valgrind recognizes as a valgrind client request
19:03 =mjw= If you want to make it even less overhead you can use if ((flags & GNUTLS_CLIENT) && RUNNING_ON_VALGRIND)
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1228#note_317552481
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/20200404/8dfeb09d/attachment.html>


More information about the Gnutls-devel mailing list