summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorjgraettinger@chromium.org <jgraettinger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-05 22:03:15 +0000
committerjgraettinger@chromium.org <jgraettinger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-05 22:03:15 +0000
commit19b4fa5f47450f22f0cb3fa972a40292a4caa1da (patch)
treebc13b1fe44cc212c6bc41288f2a565a2e5c537ef /net
parent0a7ee3de806f52d0b1058817d07cfb074d8528c9 (diff)
downloadchromium_src-19b4fa5f47450f22f0cb3fa972a40292a4caa1da.zip
chromium_src-19b4fa5f47450f22f0cb3fa972a40292a4caa1da.tar.gz
chromium_src-19b4fa5f47450f22f0cb3fa972a40292a4caa1da.tar.bz2
Add hpack_fuzz_wrapper to chromium_builder_asan (re-apply).
Also move hpack fuzz targets to build on mac & win, and tweak fuzzer tools to build on win. Re-applied patch from issue 266003005. TESTED=Manually built on windows. BUG=353237 Review URL: https://codereview.chromium.org/268943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/net.gyp72
-rw-r--r--net/spdy/fuzzing/hpack_example_generator.cc2
-rw-r--r--net/spdy/fuzzing/hpack_fuzz_mutator.cc5
-rw-r--r--net/spdy/fuzzing/hpack_fuzz_wrapper.cc3
4 files changed, 45 insertions, 37 deletions
diff --git a/net/net.gyp b/net/net.gyp
index 49519d4..3e176bd 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -1093,6 +1093,45 @@
'msvs_disabled_warnings': [4267, ],
},
{
+ 'target_name': 'hpack_example_generator',
+ 'type': 'executable',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ 'net',
+ ],
+ 'sources': [
+ 'spdy/fuzzing/hpack_example_generator.cc',
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [4267, ],
+ },
+ {
+ 'target_name': 'hpack_fuzz_mutator',
+ 'type': 'executable',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ 'net',
+ ],
+ 'sources': [
+ 'spdy/fuzzing/hpack_fuzz_mutator.cc',
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [4267, ],
+ },
+ {
+ 'target_name': 'hpack_fuzz_wrapper',
+ 'type': 'executable',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ 'net',
+ ],
+ 'sources': [
+ 'spdy/fuzzing/hpack_fuzz_wrapper.cc',
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [4267, ],
+ },
+ {
'target_name': 'net_watcher',
'type': 'executable',
'dependencies': [
@@ -1350,39 +1389,6 @@
'tools/quic/quic_server_bin.cc',
],
},
- {
- 'target_name': 'hpack_example_generator',
- 'type': 'executable',
- 'dependencies': [
- '../base/base.gyp:base',
- 'net',
- ],
- 'sources': [
- 'spdy/fuzzing/hpack_example_generator.cc',
- ],
- },
- {
- 'target_name': 'hpack_fuzz_mutator',
- 'type': 'executable',
- 'dependencies': [
- '../base/base.gyp:base',
- 'net',
- ],
- 'sources': [
- 'spdy/fuzzing/hpack_fuzz_mutator.cc',
- ],
- },
- {
- 'target_name': 'hpack_fuzz_wrapper',
- 'type': 'executable',
- 'dependencies': [
- '../base/base.gyp:base',
- 'net',
- ],
- 'sources': [
- 'spdy/fuzzing/hpack_fuzz_wrapper.cc',
- ],
- }
]
}],
['OS=="android"', {
diff --git a/net/spdy/fuzzing/hpack_example_generator.cc b/net/spdy/fuzzing/hpack_example_generator.cc
index 081451d..9e49642 100644
--- a/net/spdy/fuzzing/hpack_example_generator.cc
+++ b/net/spdy/fuzzing/hpack_example_generator.cc
@@ -48,7 +48,7 @@ int main(int argc, char** argv) {
&example_count);
DVLOG(1) << "Writing output to " << file_to_write;
- base::File file_out(base::FilePath(file_to_write),
+ base::File file_out(base::FilePath::FromUTF8Unsafe(file_to_write),
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
CHECK(file_out.IsValid()) << file_out.error_details();
diff --git a/net/spdy/fuzzing/hpack_fuzz_mutator.cc b/net/spdy/fuzzing/hpack_fuzz_mutator.cc
index c6d4e92..f0a4c7a 100644
--- a/net/spdy/fuzzing/hpack_fuzz_mutator.cc
+++ b/net/spdy/fuzzing/hpack_fuzz_mutator.cc
@@ -50,10 +50,11 @@ int main(int argc, char** argv) {
DVLOG(1) << "Reading input from " << file_to_parse;
HpackFuzzUtil::Input input;
- CHECK(base::ReadFileToString(base::FilePath(file_to_parse), &input.input));
+ CHECK(base::ReadFileToString(base::FilePath::FromUTF8Unsafe(file_to_parse),
+ &input.input));
DVLOG(1) << "Writing output to " << file_to_write;
- base::File file_out(base::FilePath(file_to_write),
+ base::File file_out(base::FilePath::FromUTF8Unsafe(file_to_write),
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
CHECK(file_out.IsValid()) << file_out.error_details();
diff --git a/net/spdy/fuzzing/hpack_fuzz_wrapper.cc b/net/spdy/fuzzing/hpack_fuzz_wrapper.cc
index 63aa114..3548082 100644
--- a/net/spdy/fuzzing/hpack_fuzz_wrapper.cc
+++ b/net/spdy/fuzzing/hpack_fuzz_wrapper.cc
@@ -35,7 +35,8 @@ int main(int argc, char** argv) {
DVLOG(1) << "Reading input from " << file_to_parse;
HpackFuzzUtil::Input input;
- CHECK(base::ReadFileToString(base::FilePath(file_to_parse), &input.input));
+ CHECK(base::ReadFileToString(base::FilePath::FromUTF8Unsafe(file_to_parse),
+ &input.input));
HpackFuzzUtil::FuzzerContext context;
HpackFuzzUtil::InitializeFuzzerContext(&context);