ICU-20652 Adds two fuzzer target for collation (compare() and
RulebasedCollator().

ICU-20652 Adds test/fuzzer/Makefile (auto-generated upon ICU4C configuration)
to .gitignore.

ICU-20652 In response to PR#693 review, corrects allocation size of char16_t
buffer.
While at it, adds generated files to .gitignore.
diff --git a/.gitignore b/.gitignore
index df00707..a335d3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -427,6 +427,9 @@
 icu4c/source/test/cintltst/x64
 icu4c/source/test/cintltst/x86
 icu4c/source/test/compat/Makefile
+icu4c/source/test/fuzzer/Makefile
+icu4c/source/test/fuzzer/*.d
+icu4c/source/test/fuzzer/*.o
 icu4c/source/test/hdrtst/Makefile
 icu4c/source/test/hdrtst/ht_*
 icu4c/source/test/intltest/*.d
diff --git a/icu4c/source/test/fuzzer/Makefile.in b/icu4c/source/test/fuzzer/Makefile.in
index f56b78d..37c609d 100644
--- a/icu4c/source/test/fuzzer/Makefile.in
+++ b/icu4c/source/test/fuzzer/Makefile.in
@@ -33,7 +33,7 @@
 DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
 LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUIO) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
 
-FUZZER_TARGETS = break_iterator_fuzzer collator_compare_fuzzer converter_fuzzer locale_fuzzer number_format_fuzzer ucasemap_fuzzer uloc_canonicalize_fuzzer uloc_for_language_tag_fuzzer uloc_get_name_fuzzer uloc_is_right_to_left_fuzzer uloc_open_keywords_fuzzer unicode_string_codepage_create_fuzzer uregex_open_fuzzer
+FUZZER_TARGETS = break_iterator_fuzzer collator_compare_fuzzer collator_rulebased_fuzzer converter_fuzzer locale_fuzzer number_format_fuzzer ucasemap_fuzzer uloc_canonicalize_fuzzer uloc_for_language_tag_fuzzer uloc_get_name_fuzzer uloc_is_right_to_left_fuzzer uloc_open_keywords_fuzzer unicode_string_codepage_create_fuzzer uregex_open_fuzzer
 
 OBJECTS = $(FUZZER_TARGETS:%=%.o)
 OBJECTS += fuzzer_driver.o locale_util.o
diff --git a/icu4c/source/test/fuzzer/collator_compare_fuzzer.cpp b/icu4c/source/test/fuzzer/collator_compare_fuzzer.cpp
new file mode 100644
index 0000000..b42b124
--- /dev/null
+++ b/icu4c/source/test/fuzzer/collator_compare_fuzzer.cpp
@@ -0,0 +1,35 @@
+// © 2019 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include <cstring>
+
+#include "fuzzer_utils.h"
+#include "unicode/coll.h"
+#include "unicode/localpointer.h"
+#include "unicode/locid.h"
+
+IcuEnvironment* env = new IcuEnvironment();
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  UErrorCode status = U_ZERO_ERROR;
+
+  if (size < 2)
+    return 0;
+
+  std::unique_ptr<char16_t> compbuff1(new char16_t[size/4]);
+  std::memcpy(compbuff1.get(), data, size/2);
+  data = data + size/2;
+  std::unique_ptr<char16_t> compbuff2(new char16_t[size/4]);
+  std::memcpy(compbuff2.get(), data, size/2);
+
+  icu::LocalPointer<icu::Collator> fuzzCollator(
+      icu::Collator::createInstance(icu::Locale::getUS(), status), status);
+  if (U_FAILURE(status))
+    return 0;
+  fuzzCollator->setStrength(icu::Collator::TERTIARY);
+
+  fuzzCollator->compare(compbuff1.get(), size/4,
+                        compbuff2.get(), size/4);
+
+  return 0;
+}
diff --git a/icu4c/source/test/fuzzer/collator_rulebased_fuzzer.cpp b/icu4c/source/test/fuzzer/collator_rulebased_fuzzer.cpp
new file mode 100644
index 0000000..9878500
--- /dev/null
+++ b/icu4c/source/test/fuzzer/collator_rulebased_fuzzer.cpp
@@ -0,0 +1,26 @@
+// © 2019 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include <cstring>
+
+#include "fuzzer_utils.h"
+#include "unicode/coll.h"
+#include "unicode/localpointer.h"
+#include "unicode/locid.h"
+#include "unicode/tblcoll.h"
+
+IcuEnvironment* env = new IcuEnvironment();
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  UErrorCode status = U_ZERO_ERROR;
+
+  size_t unistr_size = size/2;
+  std::unique_ptr<char16_t[]> fuzzbuff(new char16_t[unistr_size]);
+  std::memcpy(fuzzbuff.get(), data, unistr_size * 2);
+  icu::UnicodeString fuzzstr(false, fuzzbuff.get(), unistr_size);
+
+  icu::LocalPointer<icu::RuleBasedCollator> col1(
+      new icu::RuleBasedCollator(fuzzstr, status));
+
+  return 0;
+}
diff --git a/icu4c/source/test/fuzzer/collator_rulebased_fuzzer_seed_corpus.txt b/icu4c/source/test/fuzzer/collator_rulebased_fuzzer_seed_corpus.txt
new file mode 100644
index 0000000..241b803
--- /dev/null
+++ b/icu4c/source/test/fuzzer/collator_rulebased_fuzzer_seed_corpus.txt
Binary files differ