Skip to content

Commit

Permalink
Merge pull request #32277 from JuliaLang/sf/clangsa_llvm
Browse files Browse the repository at this point in the history
Properly failing `analyzegc` tests
  • Loading branch information
Keno authored Jun 10, 2019
2 parents 1a859d6 + 3b5deaf commit f1764ed
Show file tree
Hide file tree
Showing 122 changed files with 70 additions and 69 deletions.
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
LLVM_VER = 6.0.1
LLVM_BB_REL = 6+nowasm
LLVM_BB_REL = 7+nowasm
PCRE_VER = 10.31
PCRE_BB_REL = 0
DSFMT_VER = 2.2.3
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
32c5f933b5e8758e35c87f5054afa26c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
93c65ed59636696b98860c8227e8750636a5b40f0061bc1eb9d0811b4fb813c823fe631fc03ea74446306b9bf4643c0534ee6cafd6bc8aacf44a02a4ca11a572
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9658cbfc2e72d0176d358f51c11367e7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ba3bf88bfba4da816c9a5a68f16e3af0b9d7cb5999d605a9a63d06a241c8c342beb46d96db1130eebb00ae46aed958fd9541868fd7f9cb1c51d0b3305509fcc0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0b0920e2a2e279e92e739e3fffd18d6e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9ca4f3967c83ed3b5a51ec97a44169218e4822eb40c8b1a7d8060258709f72290f4d76dc9c26e6ae41a9bb6eddf76b3908dcc01b839a7b9b7e62ccbb6446e948
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c3ad727fb901f0f663175b307de5b1b8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63f351c3c58f8858db69dd964f909f6ea4891f836c20ff18d7344f787e57f5764febce79237aaa6b25a02964eb470c81d2881878aab25c753e79e210c8f7c8af
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f7f0818187f0d0b3291a7d27e83a1d53
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cae860ca5aeda88742a8916caa4e74d382d3b631f8b5f7b1ebbc62540a7cb2d9890a8a6c8249ab13e3ec3edb4b928ec622b5044066995ec5b91afb851922671c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8d832d7c4a1ffe5057ac9257ae417d2c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0ea0b64f64de19a24c3184d790772535c2985355d0eb7113d58c3f4bffa66c9c9edff33640c169cc05c3edca6d0abe025e0cf0552a81c0d1e612c3047fb96804
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
de0f9114398066ee9e4dc7ad2dc5239a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5811214cd654a08e44a7a103bd5a21e574d45336b579d862485c248464792ca96800ee47490a01387df8aa2af8affa8dac9b8a7a9a5a35815eede112df162325
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9d076399fbc7e0d400e6b4723223de70
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a4903d8af622fa5f08d0f790dbbc4d1cf7e46b05d44407b1bc757f86b8ddf1f45f728b406fc82b10b8e5c92cd029d182d99b6ab1344d7de645ef343247c66af1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9df643893cf28239e4f2ec1a302178ef
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8b22d1ae21746d8ce2f73a75b05cae169c68eed8b2a64cebbfe286e377b31887d2412c68d001dc6e0b92c65a4500779e3a7b9a21d7ef0dbc88c43c6037319eb5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e2962033d78f4562aed94f1d7e0ec396
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2bd15d7c3d86534ee34097c5a5d31e4f4497979664b8e85f51dbd79e2a48eb25aa1925fa67325581f4717711ee82d91a5d8f6805f0aa3eac1198817814b9d675
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e6d9664644ce47046334290735b3f508
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4df060f23066788d93a8122ca6ea6abf7fa76cdde0c05d1cd50188298504150bf48fd115e2a78e332ee12ebd240e2e53397daf21d82235db9eafaf09b5df8347
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2db2bccfa589095c8d1f4254d9cfa253
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0be45ceb79877f6037d9b0c8ba7439ffe2873b681a949c57573ba9a73c4b224a05c8fcdac6cbde9df7c8ddab324f3f44b9e91c1d120ce427baf4f35ef152bef3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8cf440fc1f74d790954a513e81e1334f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5ecaf6d3343d3afe6b43686b835c75e35b925c1766459af47ed18bc140e615203a59e6f1df63c4803f0cf7603e406b0e72b824cc8b77a765f894bc40a8d1a8b8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
71c9a128b6a41dde8672da7540ceb5a1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11d3719960c8ba4e68aa02a0c6364bb997a2fa734451c19c4b02027c81240c87355f71c2df776c25eac6d62967c9f06a20af7e502bd3a7def6698a0a0d01de16
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2ce6cffa40a4dadf59e99d04ad495b6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
854c5269e252aa1f076b75a0b8afb369a0ada62ee91365b30d3d108e01008785ebeb511575e65c03080e489c6e3db12db88c6e1729462bf2c6e95e3d757450e2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
acc66103bc030b0691da5425de12d0d4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e7fc442db075a588995def014174f8f631b7a06fec3cc21b2f2f4f42a4416fbd9f840d054bc89ab04b20e4e2614ed33fc7c75f7189a10c46b40b06ebb8b6589d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7dc70a32fd21745441387b7f7b7b71cc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a858cdb39074e02d4b2d02fc168df8605181bb100ca5877ad8607d2a49603b591e010a6dd8ce5bb97828bde7f948e9e85f537a00ac01a709914663d69566baec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f2dcde5881cb4d47c4c954210013c4db
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a900666f3827cdd67953d4caaf2084d5beb680d2cd1a73d8f2640144fc88107d2a7ff8357c7907d57e541be8a1ca3b751c281597840c790837238ec292635203
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
88ca9ab7847a5cc7136a356a7c91a7cc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6139c8df8232f749beb718b480d3093ef5b7640526a559c0affefdd2c09223d3df859a0a21c4a7d40fc7797acb7e2a6784aea78b742584d09faff16d01943f7b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8a88e8676ebe377f9245d751fbcb3295
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
404238618223d952de2366601b55eeae18f0cfd4d02f5eabe70ee504791fb5dd2131001826cbd1b2f642d914f91ded47379be8439818d20b8234885c64d4a908
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6e48d53154e7697e7f01c1bb47e8e54e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17adb6066b6962a76d06b0ae492a9d7330db51b26b9fe1925ebbd3874981a8a8848794fff88bf924fb405cf71ddb48e1efe6c4bf30293c28d342e4c160053702
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b320e6bcb0184851cc5c8f776424b73f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fd3f5a20f29d64173f02b35e0d9edc6a4df6a81a5e7c2355dd0f925869b8fb7258ab43ec0911c4e91d10a3c59432d9c709cbfa845f29c393a59daabf1c7172ae
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d0e5df7f099640b46be8ff5a66e4b6e1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e3fd81ca6a5c9b5fc23700c59ef610bf649213bda34940d7e625f90cfbf09dd6f086fb4614d02c022cf9c4eb912e7487219badc2e30eef058b60d8ecdb2219ed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c07804931969bb9e569468416b60db6c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9ccd6bc350e406e782d52d821c1b9ded8adf67c332d90072657b3c0a8d3c42b65f48d891efe855a2b5067467fff542a86cf564675cd73defed828a07814365eb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
adf71aff58ce0f5ad224cca2d9c849d1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
52cea3cfd56099777f35c2d04e4313c084f348598502d1c9c045a941bb8ec2767de81dd88abc181883c7a2fb0ec916e651a042a9666b89712162ef3b33ac6c9f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8f7ea4ba9465fdfe5a1fb182db51f1c6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a1e0fdf3a92dae0a2c0bcc81d278003453521bc7b636e0e62565152a600996b1e24720669ee0e9d8fb65e19f8c0c53865168dd5904368e2ac0e1fcbca4eb8903
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
354fe85d08d3d142404dbbdc172ce655
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b4844ef9c3c0c8be95c2fe07de9a4c2afbcf8e100699d38cf8f6caa38ad6c804812f2063faf1c669d680355c3d6e16b115618b8984313c2aee2cd37f4a6796de
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
09e636495833682b7b636a379ece3835
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0deeb5229bb55b010212feb80c79d39804a776eec988fc877636df9541ac1135c7114d0814d19a02ced312c42bd84683a8886c50e680e4a6c71582521dca42bd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
40041e58babe9172b34716829867763a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e6acd7f2baab220768df9b21374c0548d20eef6e93ffba613e286d3cd0f31464a3fd2d14f65089460113f9603d3852a40a18331bddfee855b24986ab6720c29f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bd952c914461b396924e48a67765445e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2c51c8ffd9d1c936fdbab2395cf29bc83f416473f3444ee5613a9f1b261c8693c7102bc2c2b53d2c2b5e473ffd94bd0db2d7cfc2e20d32c11129d1c3884b6214
17 changes: 9 additions & 8 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,17 @@ clean-flisp:
clean-support:
-$(MAKE) -C $(SRCDIR)/support clean BUILDDIR='$(abspath $(BUILDDIR)/support)'

cleanall: clean clean-flisp clean-support
cleanall: clean clean-flisp clean-support clean-analyzegc

$(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT): $(SRCDIR)/clangsa/GCChecker.cpp
@$(call PRINT_CC, $(CXX) -g -shared -o $@ -DCLANG_PLUGIN -I$(build_includedir) $(shell $(LLVM_CONFIG_HOST) --cxxflags) $(CPPFLAGS) $(CFLAGS) $< $(shell $(LLVM_CONFIG_HOST) --ldflags) $(LDFLAGS) -L$(build_libdir) -lclangAnalysis -lclangStaticAnalyzerCore -lclangASTMatchers -lclangAST -lclangLex -lclangBasic)

# Throw an error if a proper version of `clang` is not available.
analyzegc-deps-check:
# Note that for a default install, you will need to have run the following
# before attempting this static analysis, so that all necessary headers
# and dependencies are properly installed:
# make -c deps install-llvm install-libuv install-utf8proc install-unwind
analyzegc-deps-check: $(BUILDDIR)/julia_version.h $(BUILDDIR)/julia_flisp.boot.inc
ifeq ($(USE_BINARYBUILDER_LLVM),0)
ifneq ($(BUILD_LLVM_CLANG),1)
$(error Clang must be available to use the clang analyzer. Either build it (BUILD_LLVM_CLANG) or use BinaryBuilder)
Expand All @@ -340,7 +344,7 @@ endif

define CLANG_ANALYZE
clang-sa-$(1): $$(build_shlibdir)/libGCCheckerPlugin.$$(SHLIB_EXT) | analyzegc-deps-check
@$$(call PRINT_ANALYZE, $$(build_depsbindir)/clang --analyze -Xanalyzer -analyzer-output=text -Xclang -load -Xclang $$(build_shlibdir)/libGCCheckerPlugin.$$(SHLIB_EXT) $$(CPPFLAGS) $$(CFLAGS) $$(DEBUGFLAGS) -Xclang -analyzer-checker=core$$(COMMA)julia.GCChecker --analyzer-no-default-checks -fcolor-diagnostics -Werror -x c $$(SRCDIR)/$(1).c)
@$$(call PRINT_ANALYZE, $$(build_depsbindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text -Xclang -load -Xclang $$(build_shlibdir)/libGCCheckerPlugin.$$(SHLIB_EXT) $$(CPPFLAGS) $$(CFLAGS) $$(DEBUGFLAGS) -Xclang -analyzer-checker=core$$(COMMA)julia.GCChecker --analyzer-no-default-checks -fcolor-diagnostics -Werror -x c $$(SRCDIR)/$(1).c)
.PHONY: clang-sa-$(1)

# Add this as a target of `analyzegc`
Expand All @@ -350,10 +354,7 @@ endef
# Build a Makefile target for each file we want to analyze
$(foreach S,$(RUNTIME_C_SRCS),$(eval $(call CLANG_ANALYZE,$(S))))

# Note that for a default install, you will need to have run the following
# before attempting this static analysis, so that all necessary headers
# and dependencies are properly installed:
# make -c deps install-libuv install-utf8proc install-unwind
analyzegc: $(BUILDDIR)/julia_version.h $(BUILDDIR)/julia_flisp.boot.inc
clean-analyzegc:
rm -f $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT)

.PHONY: default all debug release clean cleanall clean-* libccalltest libllvmcalltest julia_flisp.boot.inc.phony analyzegc

0 comments on commit f1764ed

Please sign in to comment.