mirror of
https://github.com/openvswitch/ovs
synced 2025-10-13 14:07:02 +00:00
Makefile: Blacklist functions that threaded programs cannot use safely.
Some functions that POSIX says cannot be used safely in multithreaded programs are not on the initial blacklist: - getenv() should be safe in real implementations in the absence of changes to the environment. (putenv() and setenv() are blacklisted.) - We only use getopt() before spawning extra threads, and I expect this to continue to be true. Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
14
Makefile.am
14
Makefile.am
@@ -210,6 +210,20 @@ check-assert-h-usage:
|
|||||||
fi
|
fi
|
||||||
.PHONY: check-assert-h-usage
|
.PHONY: check-assert-h-usage
|
||||||
|
|
||||||
|
ALL_LOCAL += thread-safety-check
|
||||||
|
thread-safety-check:
|
||||||
|
@if test -e '$(srcdir)'/.git && (git --version) >/dev/null 2>&1 && \
|
||||||
|
grep -n -f '$(srcdir)'/build-aux/thread-safety-blacklist \
|
||||||
|
`git ls-files '$(srcdir)' | grep '\.[ch]$$' \
|
||||||
|
| $(EGREP) -v '^datapath|^lib/sflow|^third-party'` \
|
||||||
|
| $(EGREP) -v ':[ ]*/?\*'; \
|
||||||
|
then \
|
||||||
|
echo "See above for list of calls to functions that are"; \
|
||||||
|
echo "blacklisted due to thread safety issues"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
EXTRA_DIST += build-aux/thread-safety-blacklist
|
||||||
|
|
||||||
if HAVE_GROFF
|
if HAVE_GROFF
|
||||||
ALL_LOCAL += manpage-check
|
ALL_LOCAL += manpage-check
|
||||||
manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS)
|
manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS)
|
||||||
|
90
build-aux/thread-safety-blacklist
Normal file
90
build-aux/thread-safety-blacklist
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
\basctime(
|
||||||
|
\bbasename(
|
||||||
|
\bcatgets(
|
||||||
|
\bcrypt(
|
||||||
|
\bctermid(
|
||||||
|
\bctime(
|
||||||
|
\bdbm_clearerr(
|
||||||
|
\bdbm_close(
|
||||||
|
\bdbm_delete(
|
||||||
|
\bdbm_error(
|
||||||
|
\bdbm_fetch(
|
||||||
|
\bdbm_firstkey(
|
||||||
|
\bdbm_nextkey(
|
||||||
|
\bdbm_open(
|
||||||
|
\bdbm_store(
|
||||||
|
\bdirname(
|
||||||
|
\bdlerror(
|
||||||
|
\bdrand48(
|
||||||
|
\becvt(
|
||||||
|
\bencrypt(
|
||||||
|
\bendgrent(
|
||||||
|
\bendpwent(
|
||||||
|
\bendutxent(
|
||||||
|
\bfcvt(
|
||||||
|
\bftw(
|
||||||
|
\bgcvt(
|
||||||
|
\bgetc_unlocked(
|
||||||
|
\bgetchar_unlocked(
|
||||||
|
\bgetdate(
|
||||||
|
\bgetgrent(
|
||||||
|
\bgetgrgid(
|
||||||
|
\bgetgrnam(
|
||||||
|
\bgethostbyaddr(
|
||||||
|
\bgethostbyname(
|
||||||
|
\bgethostent(
|
||||||
|
\bgetlogin(
|
||||||
|
\bgetmntent(
|
||||||
|
\bgetnetbyaddr(
|
||||||
|
\bgetnetbyname(
|
||||||
|
\bgetnetent(
|
||||||
|
\bgetprotobyname(
|
||||||
|
\bgetprotobynumber(
|
||||||
|
\bgetprotoent(
|
||||||
|
\bgetpwent(
|
||||||
|
\bgetpwnam(
|
||||||
|
\bgetpwuid(
|
||||||
|
\bgetservbyname(
|
||||||
|
\bgetservbyport(
|
||||||
|
\bgetservent(
|
||||||
|
\bgetutxent(
|
||||||
|
\bgetutxid(
|
||||||
|
\bgetutxline(
|
||||||
|
\bgmtime(
|
||||||
|
\bhcreate(
|
||||||
|
\bhdestroy(
|
||||||
|
\bhsearch(
|
||||||
|
\binet_ntoa(
|
||||||
|
\bl64a(
|
||||||
|
\blgamma(
|
||||||
|
\blgammaf(
|
||||||
|
\blgammal(
|
||||||
|
\blocaleconv(
|
||||||
|
\blocaltime(
|
||||||
|
\blrand48(
|
||||||
|
\bmrand48(
|
||||||
|
\bnftw(
|
||||||
|
\bnl_langinfo(
|
||||||
|
\bptsname(
|
||||||
|
\bputc_unlocked(
|
||||||
|
\bputchar_unlocked(
|
||||||
|
\bputenv(
|
||||||
|
\bpututxline(
|
||||||
|
\brand(
|
||||||
|
\bsetenv(
|
||||||
|
\bsetgrent(
|
||||||
|
\bsetkey(
|
||||||
|
\bsetpwent(
|
||||||
|
\bsetutxent(
|
||||||
|
\bsigprocmask(
|
||||||
|
\bstrerror(
|
||||||
|
\bstrsignal(
|
||||||
|
\bstrtok(
|
||||||
|
\bsystem(
|
||||||
|
\btmpnam(
|
||||||
|
\bttyname(
|
||||||
|
\bunsetenv(
|
||||||
|
\bwcrtomb(
|
||||||
|
\bwcsrtombs(
|
||||||
|
\bwcstombs(
|
||||||
|
\bwctomb(
|
Reference in New Issue
Block a user