OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <iostream> | 5 #include <iostream> |
6 #include <set> | 6 #include <set> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 return true; | 1197 return true; |
1198 } | 1198 } |
1199 }; | 1199 }; |
1200 | 1200 |
1201 template <> | 1201 template <> |
1202 struct FuzzTraits<gpu::SyncToken> { | 1202 struct FuzzTraits<gpu::SyncToken> { |
1203 static bool Fuzz(gpu::SyncToken* p, Fuzzer* fuzzer) { | 1203 static bool Fuzz(gpu::SyncToken* p, Fuzzer* fuzzer) { |
1204 bool verified_flush = false; | 1204 bool verified_flush = false; |
1205 gpu::CommandBufferNamespace namespace_id = | 1205 gpu::CommandBufferNamespace namespace_id = |
1206 gpu::CommandBufferNamespace::INVALID; | 1206 gpu::CommandBufferNamespace::INVALID; |
1207 int32_t extra_data_field = 0; | |
1208 uint64_t command_buffer_id = 0; | 1207 uint64_t command_buffer_id = 0; |
1209 uint64_t release_count = 0; | 1208 uint64_t release_count = 0; |
1210 | 1209 |
1211 if (!FuzzParam(&verified_flush, fuzzer)) | 1210 if (!FuzzParam(&verified_flush, fuzzer)) |
1212 return false; | 1211 return false; |
1213 if (!FuzzParam(&namespace_id, fuzzer)) | 1212 if (!FuzzParam(&namespace_id, fuzzer)) |
1214 return false; | 1213 return false; |
1215 if (!FuzzParam(&extra_data_field, fuzzer)) | |
1216 return false; | |
1217 if (!FuzzParam(&command_buffer_id, fuzzer)) | 1214 if (!FuzzParam(&command_buffer_id, fuzzer)) |
1218 return false; | 1215 return false; |
1219 if (!FuzzParam(&release_count, fuzzer)) | 1216 if (!FuzzParam(&release_count, fuzzer)) |
1220 return false; | 1217 return false; |
1221 | 1218 |
1222 p->Clear(); | 1219 p->Clear(); |
1223 p->Set(namespace_id, extra_data_field, command_buffer_id, release_count); | 1220 p->Set(namespace_id, command_buffer_id, release_count); |
1224 if (verified_flush) | 1221 if (verified_flush) |
1225 p->SetVerifyFlush(); | 1222 p->SetVerifyFlush(); |
1226 return true; | 1223 return true; |
1227 } | 1224 } |
1228 }; | 1225 }; |
1229 | 1226 |
1230 template <> | 1227 template <> |
1231 struct FuzzTraits<gpu::MailboxHolder> { | 1228 struct FuzzTraits<gpu::MailboxHolder> { |
1232 static bool Fuzz(gpu::MailboxHolder* p, Fuzzer* fuzzer) { | 1229 static bool Fuzz(gpu::MailboxHolder* p, Fuzzer* fuzzer) { |
1233 if (!FuzzParam(&p->mailbox, fuzzer)) | 1230 if (!FuzzParam(&p->mailbox, fuzzer)) |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 2123 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
2127 #undef IPC_MESSAGE_DECL | 2124 #undef IPC_MESSAGE_DECL |
2128 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ | 2125 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ |
2129 (*map)[static_cast<uint32>(name::ID)] = fuzzer_for_##name; | 2126 (*map)[static_cast<uint32>(name::ID)] = fuzzer_for_##name; |
2130 | 2127 |
2131 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 2128 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
2132 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 2129 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
2133 } | 2130 } |
2134 | 2131 |
2135 } // namespace ipc_fuzzer | 2132 } // namespace ipc_fuzzer |
OLD | NEW |