[cfe-dev] [analyzer] Failure to register checkers when multiple plugins are loaded

Julian Ganz via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 5 07:37:50 PDT 2018


Hello clang-dev,

I'm (still) working at a configurable taint checker for a special use-case. It depends on the built-in `alpha.security.taint.TaintPropagation` checker doing most of the work.

As the built-in checker only models C constructs, we also have to model at least some C++ constructs in order for our analysis to be of reasonable use. An examle would be tainting return values of methods invoked on tainted objects. For the sake of reusability alone, I started writing an additional checker with the sole purpose of performing taint propagation in said situations.

However, it appears that when specifying multiple plugins via the `-load` parameter, `clang++` executes `clang_registerCheckers()` but not the initialization function passed to it (at least not for all plugins). Interestingly, both checkers are registered and invoked when the template-overload is used in one of them. The order of the `-load` parameters does not appear to matter, either. Sadly, it took nearly a day for me to figure this out.

I suppose this is a bug?

I'm using clang++ 5.0 right now. I did not test whether this reproduces with other versions of clang.

Greetings,
Julian Ganz



More information about the cfe-dev mailing list