Skip to content

Commit

Permalink
Add publicly available corpus for string_to_number fuzz.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 223252037
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Nov 29, 2018
1 parent 9831eb8 commit 0f98c06
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 10 deletions.
3 changes: 3 additions & 0 deletions tensorflow/core/kernels/fuzzing/BUILD
Expand Up @@ -18,11 +18,14 @@ cc_library(
)

load("//tensorflow/core/kernels/fuzzing:tf_ops_fuzz_target_lib.bzl", "tf_ops_fuzz_target_lib")
load("//tensorflow/core/kernels/fuzzing:tf_ops_fuzz_target_lib.bzl", "tf_oss_fuzz_corpus")

tf_ops_fuzz_target_lib("identity")

tf_ops_fuzz_target_lib("string_to_number")

tf_oss_fuzz_corpus("string_to_number")

tf_ops_fuzz_target_lib("string_split")

tf_ops_fuzz_target_lib("string_split_v2")
Expand Down
@@ -0,0 +1 @@
6.023e+23
@@ -0,0 +1 @@
6.023e-23
@@ -0,0 +1 @@
42
@@ -0,0 +1 @@
0xabcdef
@@ -0,0 +1 @@
3.14159265359
@@ -0,0 +1 @@
0.69314718056
@@ -0,0 +1 @@
6.023e23
@@ -0,0 +1 @@
1.61803
@@ -0,0 +1 @@
-42
@@ -0,0 +1 @@
6.023E+23
@@ -0,0 +1 @@
2.71828182846
26 changes: 16 additions & 10 deletions tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl
@@ -1,13 +1,19 @@
"""Fuzzing template for TensorFlow ops."""

def tf_ops_fuzz_target_lib(name):
native.cc_library(
name = name + "_fuzz_lib",
srcs = [name + "_fuzz.cc"],
deps = [
"//tensorflow/core/kernels/fuzzing:fuzz_session",
"//tensorflow/cc:cc_ops",
],
tags = ["no_windows"],
alwayslink = 1,
)
native.cc_library(
name = name + "_fuzz_lib",
srcs = [name + "_fuzz.cc"],
deps = [
"//tensorflow/core/kernels/fuzzing:fuzz_session",
"//tensorflow/cc:cc_ops",
],
tags = ["no_windows"],
alwayslink = 1,
)

def tf_oss_fuzz_corpus(name):
native.filegroup(
name = name + "_corpus",
srcs = native.glob(["corpus/" + name + "/*"]),
)

0 comments on commit 0f98c06

Please sign in to comment.