From 87d332dcdbffe8ff60d99f74b1ad241c0967b055 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 24 Oct 2017 01:29:53 -0700 Subject: bpo-31810: Add smelly.py to check exported symbols (#4057) * Add Tools/scripts/smelly.py: script checking if all symbols exported by libpython start with "Py" or "_Py". * Modify "make smelly" to run smelly.py: the command now fails with a non-zero exit code if libpython leaks a "smelly" symbol. * Travis CI now runs "make smelly" --- Makefile.pre.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index e8df8f7355e..6dacb872e0c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1659,10 +1659,9 @@ distclean: clobber -o -name '*.bak' ')' \ -exec rm -f {} ';' -# Check for smelly exported symbols (not starting with Py/_Py) +# Check that all symbols exported by libpython start with "Py" or "_Py" smelly: @DEF_MAKE_RULE@ - nm -p $(LIBRARY) | \ - sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \ + $(RUNSHARED) ./$(BUILDPYTHON) Tools/scripts/smelly.py # Find files with funny names funny: -- cgit v1.2.3-65-gdbad