Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: tools/clang/plugins/tests/ipc.txt

Issue 1665363002: Clang plugin to check that unstable types are not used in IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blacklist types instead Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ppapi/proxy/ppapi_messages.h ('K') | « tools/clang/plugins/tests/ipc.flags ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/ipc.txt
diff --git a/tools/clang/plugins/tests/ipc.txt b/tools/clang/plugins/tests/ipc.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b73e6e20ed74ca73a630fdb9c6ca291320cd60b5
--- /dev/null
+++ b/tools/clang/plugins/tests/ipc.txt
@@ -0,0 +1,197 @@
+ipc.cpp:91:5: error: [chromium-ipc] IPC::WriteParam() must explicitly specify template argument (use WriteParam<T>(...)).
+ IPC::WriteParam(pickle, container.value); // ERROR
+ ^
+ipc.cpp:92:5: error: [chromium-ipc] IPC::WriteParam() must explicitly specify template argument (use WriteParam<T>(...)).
+ WriteParam(pickle, container.value); // ERROR
+ ^
+ipc.cpp:102:24: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'.
+ WriteParam(pickle, static_cast<long>(container.value)); // ERROR
+ ^
+ipc.cpp:125:5: error: [chromium-ipc] IPC::WriteParam() can only be used in IPC::ParamTraits<> templates.
+ IPC::WriteParam(pickle, p); // ERROR
+ ^
+ipc.cpp:133:3: error: [chromium-ipc] IPC::WriteParam() can only be used in IPC::ParamTraits<> templates.
+ IPC::WriteParam(pickle, p); // ERROR
+ ^
+ipc.cpp:135:5: error: [chromium-ipc] IPC::WriteParam() can only be used in IPC::ParamTraits<> templates.
+ IPC::WriteParam(pickle, p); // ERROR
+ ^
+ipc.cpp:162:1: error: [chromium-ipc] IPC tuple references banned type 'size_t'.
+IPC_TEST_MESSAGE(__COUNTER__, (bool, size_t, Empty, long)) // 2 ERRORs
+^
+ipc.cpp:158:3: note: expanded from macro 'IPC_TEST_MESSAGE'
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in)
+ ^
+ipc.cpp:154:5: note: expanded from macro 'IPC_MESSAGE_DECL'
+ using InTuple = in_tuple; \
+ ^
+ipc.cpp:162:1: error: [chromium-ipc] IPC tuple references banned type 'long'.
+ipc.cpp:158:3: note: expanded from macro 'IPC_TEST_MESSAGE'
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in)
+ ^
+ipc.cpp:154:5: note: expanded from macro 'IPC_MESSAGE_DECL'
+ using InTuple = in_tuple; \
+ ^
+ipc.cpp:166:1: error: [chromium-ipc] IPC tuple references banned type 'long' via 'long2D'.
+IPC_TEST_MESSAGE(__COUNTER__, (bool, long2D)) // ERROR
+^
+ipc.cpp:158:3: note: expanded from macro 'IPC_TEST_MESSAGE'
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in)
+ ^
+ipc.cpp:154:5: note: expanded from macro 'IPC_MESSAGE_DECL'
+ using InTuple = in_tuple; \
+ ^
+ipc.cpp:165:29: note:
+typedef std::vector<long1D> long2D;
+ ^
+ipc.cpp:164:27: note:
+typedef std::vector<long> long1D;
+ ^
+ipc.cpp:168:1: error: [chromium-ipc] IPC tuple references banned type 'size_t' via 'std::pair<size_t, _Bool>'.
+IPC_TEST_MESSAGE(__COUNTER__, (char, short, std::pair<size_t, bool>)) // ERROR
+^
+ipc.cpp:158:3: note: expanded from macro 'IPC_TEST_MESSAGE'
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in)
+ ^
+ipc.cpp:154:5: note: expanded from macro 'IPC_MESSAGE_DECL'
+ using InTuple = in_tuple; \
+ ^
+ipc.cpp:184:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'.
+ CALL_WRITEPARAM(long) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:185:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'.
+ CALL_WRITEPARAM(unsigned long) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:186:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'intmax_t'.
+ CALL_WRITEPARAM(intmax_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:187:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'uintmax_t'.
+ CALL_WRITEPARAM(uintmax_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:188:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'intptr_t'.
+ CALL_WRITEPARAM(intptr_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:189:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'uintptr_t'.
+ CALL_WRITEPARAM(uintptr_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:190:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'wint_t'.
+ CALL_WRITEPARAM(wint_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:191:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'.
+ CALL_WRITEPARAM(size_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:192:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'rsize_t'.
+ CALL_WRITEPARAM(rsize_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:193:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'ssize_t'.
+ CALL_WRITEPARAM(ssize_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:194:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'ptrdiff_t'.
+ CALL_WRITEPARAM(ptrdiff_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:195:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'dev_t'.
+ CALL_WRITEPARAM(dev_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:196:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'off_t'.
+ CALL_WRITEPARAM(off_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:197:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'clock_t'.
+ CALL_WRITEPARAM(clock_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:198:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'time_t'.
+ CALL_WRITEPARAM(time_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:199:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'suseconds_t'.
+ CALL_WRITEPARAM(suseconds_t) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:203:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'my_size'.
+ CALL_WRITEPARAM(my_size) // ERROR
+ ^
+ipc.cpp:180:32: note: expanded from macro 'CALL_WRITEPARAM'
+ IPC::WriteParam(nullptr, p); \
+ ^
+ipc.cpp:202:18: note:
+ typedef size_t my_size;
+ ^
+ipc.cpp:208:30: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'.
+ IPC::WriteParam(nullptr, p + 1); // ERROR
+ ^
+ipc.cpp:217:30: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'my_size'.
+ IPC::WriteParam(nullptr, p); // ERROR
+ ^
+ipc.cpp:214:32: note:
+ typedef const my_size_base my_size;
+ ^
+ipc.cpp:213:20: note:
+ typedef size_t my_size_base;
+ ^
+ipc.cpp:278:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'.
+ IPC::WriteParam(nullptr, p.get<long>()); // ERROR
+ ^
+ipc.cpp:279:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'.
+ IPC::WriteParam(nullptr, p.get_long()); // ERROR
+ ^
+ipc.cpp:280:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'.
+ IPC::WriteParam(nullptr, p.long_data); // ERROR
+ ^
+ipc.cpp:282:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'.
+ IPC::WriteParam(nullptr, p.get<size_t>()); // ERROR
+ ^
+ipc.cpp:283:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'.
+ IPC::WriteParam(nullptr, p.get_size()); // ERROR
+ ^
+ipc.cpp:284:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'.
+ IPC::WriteParam(nullptr, p.size_data); // ERROR
+ ^
+ipc.cpp:288:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'.
+ IPC::WriteParam(nullptr, p.get<uint64_t>()); // ERROR
+ ^
+36 errors generated.
« ppapi/proxy/ppapi_messages.h ('K') | « tools/clang/plugins/tests/ipc.flags ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698