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

George Karpenkov via cfe-dev cfe-dev at lists.llvm.org
Fri May 11 18:02:16 PDT 2018


Hi Julian,

Loading multiple plugins should definitely be supported, could you give a bit more details on the error you get?
A smallest reproducible example (two checkers of a few lines each, a shell script compiling both and then loading them, and an example
of the behavior you expect but do not get) would be perfect.

Regards,
George

> On Apr 5, 2018, at 7:37 AM, Julian Ganz via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> 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
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list