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

Side by Side Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 1906403003: Removed gpu::ValueState from IPC fuzzer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 return false; 1246 return false;
1247 if (!FuzzParam(&p->sync_token, fuzzer)) 1247 if (!FuzzParam(&p->sync_token, fuzzer))
1248 return false; 1248 return false;
1249 if (!FuzzParam(&p->texture_target, fuzzer)) 1249 if (!FuzzParam(&p->texture_target, fuzzer))
1250 return false; 1250 return false;
1251 return true; 1251 return true;
1252 } 1252 }
1253 }; 1253 };
1254 1254
1255 template <> 1255 template <>
1256 struct FuzzTraits<gpu::ValueState> {
1257 static bool Fuzz(gpu::ValueState* p, Fuzzer* fuzzer) {
1258 if (!FuzzParamArray(&p->float_value[0], 4, fuzzer))
1259 return false;
1260 if (!FuzzParamArray(&p->int_value[0], 4, fuzzer))
1261 return false;
1262 return true;
1263 }
1264 };
1265
1266 template <>
1267 struct FuzzTraits<GURL> { 1256 struct FuzzTraits<GURL> {
1268 static bool Fuzz(GURL* p, Fuzzer* fuzzer) { 1257 static bool Fuzz(GURL* p, Fuzzer* fuzzer) {
1269 if (!fuzzer->ShouldGenerate()) { 1258 if (!fuzzer->ShouldGenerate()) {
1270 std::string spec = p->possibly_invalid_spec(); 1259 std::string spec = p->possibly_invalid_spec();
1271 if (!FuzzParam(&spec, fuzzer)) 1260 if (!FuzzParam(&spec, fuzzer))
1272 return false; 1261 return false;
1273 if (spec != p->possibly_invalid_spec()) 1262 if (spec != p->possibly_invalid_spec())
1274 *p = GURL(spec); 1263 *p = GURL(spec);
1275 return true; 1264 return true;
1276 } 1265 }
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" 2031 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
2043 #undef IPC_MESSAGE_DECL 2032 #undef IPC_MESSAGE_DECL
2044 #define IPC_MESSAGE_DECL(name, ...) \ 2033 #define IPC_MESSAGE_DECL(name, ...) \
2045 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; 2034 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz;
2046 2035
2047 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { 2036 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) {
2048 #include "tools/ipc_fuzzer/message_lib/all_messages.h" 2037 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
2049 } 2038 }
2050 2039
2051 } // namespace ipc_fuzzer 2040 } // namespace ipc_fuzzer
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698