From b546504c58de7e118e6805d351dc0e2e5d05e596 Mon Sep 17 00:00:00 2001 From: Mihai Maruseac Date: Mon, 8 Jun 2020 16:34:08 -0700 Subject: [PATCH] Move identity_fuzz to new location. Add linkstatic=1 to fuzz target. PiperOrigin-RevId: 315378448 Change-Id: I1df43a32fa81f2c9ff34aa2defbdb431831244ca --- tensorflow/core/kernels/fuzzing/BUILD | 2 -- tensorflow/security/fuzzing/BUILD | 14 ++++++++++++++ .../kernels => security}/fuzzing/identity_fuzz.cc | 0 tensorflow/security/fuzzing/tf_fuzzing.bzl | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) rename tensorflow/{core/kernels => security}/fuzzing/identity_fuzz.cc (100%) diff --git a/tensorflow/core/kernels/fuzzing/BUILD b/tensorflow/core/kernels/fuzzing/BUILD index a27049a0bec..4133462cad5 100644 --- a/tensorflow/core/kernels/fuzzing/BUILD +++ b/tensorflow/core/kernels/fuzzing/BUILD @@ -17,8 +17,6 @@ cc_library( ], ) -tf_ops_fuzz_target_lib("identity") - tf_ops_fuzz_target_lib("string_to_number") tf_oss_fuzz_corpus("string_to_number") diff --git a/tensorflow/security/fuzzing/BUILD b/tensorflow/security/fuzzing/BUILD index 887e1a23cdf..a2a68ed898f 100644 --- a/tensorflow/security/fuzzing/BUILD +++ b/tensorflow/security/fuzzing/BUILD @@ -15,3 +15,17 @@ tf_fuzz_target( name = "demo_fuzz", srcs = ["demo_fuzz.cc"], ) + +# A trivial fuzzer with no pre-specified corpus. +# TODO(mihaimaruseac): Move fuzz_session and the op fuzzers to a subdirectory +tf_fuzz_target( + name = "identity_fuzz", + srcs = ["identity_fuzz.cc"], + deps = [ + "//tensorflow/cc:cc_ops", + "//tensorflow/core/kernels/fuzzing:fuzz_session", + # Needed only to transitiviely link dependencies + "//tensorflow/cc:scope", + "//tensorflow/core:core_cpu", + ], +) diff --git a/tensorflow/core/kernels/fuzzing/identity_fuzz.cc b/tensorflow/security/fuzzing/identity_fuzz.cc similarity index 100% rename from tensorflow/core/kernels/fuzzing/identity_fuzz.cc rename to tensorflow/security/fuzzing/identity_fuzz.cc diff --git a/tensorflow/security/fuzzing/tf_fuzzing.bzl b/tensorflow/security/fuzzing/tf_fuzzing.bzl index 63a8cbac704..b76c22b016a 100644 --- a/tensorflow/security/fuzzing/tf_fuzzing.bzl +++ b/tensorflow/security/fuzzing/tf_fuzzing.bzl @@ -76,5 +76,6 @@ def tf_fuzz_target( deps = deps, # TODO(mihaimaruseac): fuzzing lib? data = data, # TODO(mihaimaruseac): dict, corpus, parsers?? tags = tags, # TODO(mihaimaruseac): fuzzing tags? + linkstatic = 1, **kwargs )