Verify format specifiers in bpf_trace_printk in rewriter
authorPaul Chaignon <paul.chaignon@gmail.com>
Sun, 12 Mar 2017 13:49:01 +0000 (14:49 +0100)
committerPaul Chaignon <paul.chaignon@gmail.com>
Tue, 21 Mar 2017 20:28:29 +0000 (21:28 +0100)
commit9341942891de2943371ff8650935325081a86506
treebf6fef575dbedb48e153a86880dd0ea160e0a92d
parentdd3867d3b218972c1f090ef78145a1f471893702
Verify format specifiers in bpf_trace_printk in rewriter

Verifies format specifiers while rewriting calls to bpf_trace_printk
and prints a warning the printk will be rejected by the kernel at
runtime.

For tests, redirects stderr at the file descriptor level in order to
catch warnings from the C library.
src/cc/frontends/clang/b_frontend_action.cc
src/cc/frontends/clang/b_frontend_action.h
tests/python/test_clang.py