From: Dan K. <da...@ke...> - 2003-07-03 15:05:49
|
Nicholas Nethercote wrote: > Doing the same on my system, I also got these ones (that weren't on the > original blacklist): > > ether_ntoa ether_aton > nis_leaf_of nis_name_of nis_domain_of nis_sperror > getaliasent getaliasbyname gethostbyname2 getservbyname > getnetgrent getpwnam getspent getspnam > sgetspent fgetspent > rand > ptsname getdate getutent getutid getutline > BIO_gethostbyname > > Should they go in too? You can check SuSv3 for each standard function; it's pretty good about telling you what's threadsafe/reentrant and what isn't. e.g. http://www.opengroup.org/onlinepubs/007904975/functions/rand.html says "[CX] The rand() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe. " BTW, this tool of yours is pretty cool. I bet a similar test could be applied at compile time using smatch http://smatch.sourceforge.net/ That'd be quite a combination -- catch a bunch of them statically, and then use your dynamic tool to find some the static checker missed... - Dan -- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 |