- This is a demonstration of a patch, I'd like to generalize it and use proper setup **
This is a preleminary patch for this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1827338
Basically, libclang_rt.asan provides a weak version of the crypt_r symbol (among others) which prevents the linker from raising a link error if the user forgets to link with the crypt library. Adding the appropriate check for crypt_r during interceptor installation helps to report the error correctly.
I think the check code should be put in a more generic place (where?) and maybe the error message be improved (?)