Under some circumstances valgrind might crash at program exit when cleaning up using __libc_freeres. See the upstream bug reproducer: https://sourceware.org/bugzilla/attachment.cgi?id=11750 This has been fixed upstream: https://sourceware.org/ml/libc-stable/2019-05/msg00010.html
*** Bug 1727912 has been marked as a duplicate of this bug. ***
Verified, the bug has been fixed in glibc-2.28-69.el8
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3513