diff options
author | aizatsky <aizatsky@chromium.org> | 2015-11-20 23:18:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-21 07:19:12 +0000 |
commit | b88ffb2d8d3188ad74f8e6585efc77d41827a1a5 (patch) | |
tree | bf687e0146abb3cae9bf342bc666204c702ec972 /testing | |
parent | c21ad3ccd0ca211b8403966826ce44b7034daf91 (diff) | |
download | chromium_src-b88ffb2d8d3188ad74f8e6585efc77d41827a1a5.zip chromium_src-b88ffb2d8d3188ad74f8e6585efc77d41827a1a5.tar.gz chromium_src-b88ffb2d8d3188ad74f8e6585efc77d41827a1a5.tar.bz2 |
initializing ICU in url fuzzer.
BUG=
Review URL: https://codereview.chromium.org/1467713004
Cr-Commit-Position: refs/heads/master@{#361011}
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libfuzzer/fuzzers/BUILD.gn | 1 | ||||
-rw-r--r-- | testing/libfuzzer/fuzzers/url_parse_fuzzer.cc | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/testing/libfuzzer/fuzzers/BUILD.gn b/testing/libfuzzer/fuzzers/BUILD.gn index 60126ff..740bcef 100644 --- a/testing/libfuzzer/fuzzers/BUILD.gn +++ b/testing/libfuzzer/fuzzers/BUILD.gn @@ -164,6 +164,7 @@ test("url_parse_fuzzer") { "url_parse_fuzzer.cc", ] deps = [ + "//base:i18n", "//testing/libfuzzer:libfuzzer_main", "//url:url", ] diff --git a/testing/libfuzzer/fuzzers/url_parse_fuzzer.cc b/testing/libfuzzer/fuzzers/url_parse_fuzzer.cc index 48df2c8..ce51cee 100644 --- a/testing/libfuzzer/fuzzers/url_parse_fuzzer.cc +++ b/testing/libfuzzer/fuzzers/url_parse_fuzzer.cc @@ -2,8 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/at_exit.h" +#include "base/i18n/icu_util.h" #include "url/gurl.h" +struct TestCase { + TestCase() { + CHECK(base::i18n::InitializeICU()); + } + + // used by ICU integration. + base::AtExitManager at_exit_manager; +}; + +TestCase* test_case = new TestCase(); + // Entry point for LibFuzzer. extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) { |