Amit Patankar
7d599ee92c
Fix tf.raw_ops.CTCGreedyDecoder CHECK failure.
...
PiperOrigin-RevId: 369960465
Change-Id: If0b8b3264d5a47a24ac0970ed7b81ce6b4921fae
2021-05-20 15:44:55 -07:00
Amit Patankar
1ca6d32e4f
Fix tf.raw_ops.QuantizeAndDequantizeV4Grad CHECK failure.
...
PiperOrigin-RevId: 370532425
Change-Id: I767721be266851b63d8fe55e7ac6be0af6017f6c
2021-05-20 15:24:10 -07:00
Mihai Maruseac
67c8f05fc6
Enhance validation of ngram op and handle case of 0 tokens.
...
PiperOrigin-RevId: 369940178
Change-Id: Ia82f42c09d14efe76e7dc013505b832a42282f0b
2021-05-20 15:22:13 -07:00
Mihai Maruseac
97bf91ca4a
Fix issues in Conv2DBackpropFilter.
...
PiperOrigin-RevId: 369772454
Change-Id: I49b465f2ae2ce91def61b56cea8000197d5177d8
2021-05-20 14:27:17 -07:00
Mihai Maruseac
75244f2487
Validate arguments to QuantizedReshape.
...
Ensure that validations from `Reshape` also terminate `QuantizedReshape` on failure.
PiperOrigin-RevId: 369775421
Change-Id: If8c5342267aceea65b7cb83a4b183304886f1ce8
2021-05-20 14:21:01 -07:00
Mihai Maruseac
3e6b6ef241
Cherrypick:Validate min and max arguments to .
2021-05-20 14:15:12 -07:00
Amit Patankar
3d9aa551d7
Fix overflow CHECK issue with tf.raw_ops.AddManySparseToTensorsMap.
...
PiperOrigin-RevId: 369755048
Change-Id: Ia1663e49ef8387d84baa2c15dccf3506adffde84
2021-05-20 13:55:09 -07:00
Mihai Maruseac
e813910be6
Validate inputs to QuantizedMul
...
PiperOrigin-RevId: 369756982
Change-Id: I00d960cc3b9316fd7a86bd37a44e341c96e17624
2021-05-20 13:49:29 -07:00
Amit Patankar
856c129283
Fix overflow CHECK issue with tf.raw_ops.DrawBoundingBoxes.
...
PiperOrigin-RevId: 369753591
Change-Id: I3b45fc98ee0d28a3c20b7e9c995aa647c976ec40
2021-05-20 13:44:51 -07:00
Mihai Maruseac
ab88c6f3df
Fix out of bounds read in ragged_cross_op.cc.
...
PiperOrigin-RevId: 369757702
Change-Id: Ie6e5d2c21513a8d56bf41fcf35960caf76e890f9
2021-05-20 13:07:41 -07:00
Amit Patankar
5da941c3b5
Fix null CHECK issue with tf.raw_ops.EncodePng.
...
PiperOrigin-RevId: 369717714
Change-Id: I24136cd99c20b8466671f4f93b670ef6f6dd1250
2021-05-20 12:58:03 -07:00
Mihai Maruseac
92984f3cfb
Fix heap buffer overflow caused by rounding.
...
This was hard to fix. Due to the way we compute the pixels that influence an output pixel in resized images, for certain input configuration we might have issued a read to a pixel that is outside of boundary of the original image. This is because of floating errors that affected truncation results.
PiperOrigin-RevId: 369757871
Change-Id: If89425fff930983829a2168203c11858883eebc9
2021-05-20 12:53:23 -07:00
Mihai Maruseac
54f3e395ba
Remove OP_REQUIRES call from helper function.
...
Since `OP_REQUIRES` macro expands to a `return;` (among other), calling it in a helper function only ends the helper function's execution earlier, but the kernel will still run from start to end. Thus, all the expected validations are actually broken/useless as the code ploughs through the next crash anyway.
PiperOrigin-RevId: 369524386
Change-Id: I54f6cf9328445675ccc392e661b04336b229c9da
2021-05-20 12:47:59 -07:00
Mihai Maruseac
2fdcef989a
Fix one division by zero
...
PiperOrigin-RevId: 369474832
Change-Id: I1082858ed78d9b2e4738ce30b231955973d49e1e
2021-05-20 12:39:24 -07:00
Mihai Maruseac
71f4fed476
Fix one FPE and remove two CHECK-fails.
...
PiperOrigin-RevId: 369349640
Change-Id: I1fedbfc2b5bab635c5cb51f103d7c9176f79831a
2021-05-20 12:32:07 -07:00
Mihai Maruseac
aee3d779d1
Merge pull request #49318 from geetachavan1/cherrypicks_SJMS7
...
Fix `tf.raw_ops.ResourceCountUpTo` null pointer dereference.
2021-05-20 08:30:43 -07:00
Mihai Maruseac
f36932288f
Merge pull request #49316 from geetachavan1/cherrypicks_383PR
...
Fix segfaults in `tf.raw_ops.SparseCountSparseOutput`.
2021-05-20 08:29:18 -07:00
Mihai Maruseac
8fbc6b2448
Merge pull request #49312 from ashahab/abin-load-segfault-r2.4
...
Resolves coredump caused by `tf.data.experimental.save` with prefetch
2021-05-20 08:28:43 -07:00
Mihai Maruseac
ad8dfb5d10
Merge pull request #49333 from geetachavan1/cherrypicks_9XDBG
...
Fix `tf.raw_ops.GetSessionTensor` and `tf.raw_ops.DeleteSessionTensor` null pointer dereferences.
2021-05-20 08:25:53 -07:00
Mihai Maruseac
c21531e2a1
Merge pull request #49330 from geetachavan1/cherrypicks_C56P8
...
Fix `tf.raw_ops.RaggedTensorToVariant` invalid resize.
2021-05-20 08:25:00 -07:00
Mihai Maruseac
a4030463a0
Merge pull request #49329 from geetachavan1/cherrypicks_X64B5
...
Handle a special grappler case resulting in crash.
2021-05-20 08:24:45 -07:00
Mihai Maruseac
ca1aeca509
Merge pull request #49325 from geetachavan1/cherrypicks_BTAWI
...
Validate `MatrixDiagV{2,3}` arguments to prevent breakage.
2021-05-20 08:23:34 -07:00
Mihai Maruseac
e7c76bf2a4
Merge pull request #49364 from geetachavan1/cherrypicks_ZSLEN
...
Prevent another division by zero.
2021-05-20 08:21:28 -07:00
Mihai Maruseac
b2ffbd42c0
Merge pull request #49359 from geetachavan1/cherrypicks_9I2EK
...
Fix overflow CHECK issue with `tf.raw_ops.AddManySparseToTensorsMap`.
2021-05-20 08:20:06 -07:00
Mihai Maruseac
95ac8301f0
Merge pull request #49351 from geetachavan1/cherrypicks_U2EIH
...
Validate some shape requirements for `Conv3DBackpropFilter*` and `Conv3DBackpropInput*` ops.
2021-05-20 08:16:01 -07:00
Mihai Maruseac
5d97b2f5dc
Merge pull request #49348 from geetachavan1/cherrypicks_6I1PG
...
Fix the segfault in `tf.raw_ops.SparseCountSparseOutput`.
2021-05-20 08:15:00 -07:00
Mihai Maruseac
8284a1e4d4
Merge pull request #49345 from geetachavan1/cherrypicks_83DUX
...
Fix `tf.raw_ops.SparseCross` failing CHECK.
2021-05-20 08:14:09 -07:00
Mihai Maruseac
229a22d2e6
Merge pull request #49344 from geetachavan1/cherrypicks_4AQNL
...
Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK in `tensor.cc`.
2021-05-20 08:13:55 -07:00
Mihai Maruseac
b0b622aa94
Merge pull request #49340 from geetachavan1/cherrypicks_O3RQE
...
Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK.
2021-05-20 08:12:52 -07:00
Mihai Maruseac
c5db8baada
Prevent another division by zero.
...
PiperOrigin-RevId: 369338598
Change-Id: I55471d363e401fdcf8d259670ad4eef672b731e2
2021-05-19 17:14:27 -07:00
Amit Patankar
705c67e758
Fix overflow CHECK issue with tf.raw_ops.AddManySparseToTensorsMap.
...
PiperOrigin-RevId: 369492969
Change-Id: I1d70d6c0c92e3d7a25bc3b3aa2a0c0ac9688bf81
2021-05-19 17:09:38 -07:00
Mihai Maruseac
d9fe8aecb8
Eliminate a division by 0 in 3D convolutions.
2021-05-19 17:02:31 -07:00
Mihai Maruseac
fc2271991b
Validate some shape requirements for Conv3DBackpropFilter* and Conv3DBackpropInput* ops.
...
Older versions of Eigen might otherwise crash / produce OOB read on specially crafted inputs.
PiperOrigin-RevId: 369293977
Change-Id: I58f51445a93936d7cf8e616f75de17677df36718
2021-05-19 16:23:08 -07:00
Amit Patankar
428e5f14d6
Fix the segfault in tf.raw_ops.SparseCountSparseOutput.
...
PiperOrigin-RevId: 369264941
Change-Id: I23a96a15b8370c01ee21ba3841e1c7dcbf55e93d
2021-05-19 16:18:03 -07:00
Amit Patankar
c664ac88cd
Fix tf.raw_ops.SparseCross failing CHECK.
...
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d
2021-05-19 16:05:09 -07:00
Amit Patankar
0026804b79
Fix tf.raw_ops.RaggedTensorToTensor failing CHECK in tensor.cc.
...
PiperOrigin-RevId: 368300502
Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64
2021-05-19 16:01:59 -07:00
Amit Patankar
6d04d08d0a
Fix tf.raw_ops.RaggedTensorToTensor failing CHECK.
...
PiperOrigin-RevId: 368706628
Change-Id: I5c9ea4833f38835ee183ca50d63251dc89c9f3bc
2021-05-19 15:55:52 -07:00
Amit Patankar
d7f511cce7
Fix tf.raw_ops.GetSessionTensor and tf.raw_ops.DeleteSessionTensor null pointer dereferences.
...
PiperOrigin-RevId: 368294154
Change-Id: Ie10f07a0a9a1c2b685e08153d48a0ca4b93f9fc9
2021-05-19 15:26:49 -07:00
Amit Patankar
58318d3333
Fix tf.raw_ops.RaggedTensorToVariant invalid resize.
...
PiperOrigin-RevId: 368299574
Change-Id: I751c186325aa0bab397928845e790e60c2d90918
2021-05-19 14:03:08 -07:00
Mihai Maruseac
26d49a02bf
Handle a special grappler case resulting in crash.
...
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f136f6b
2021-05-19 13:56:13 -07:00
Mihai Maruseac
00f04edf22
Validate MatrixDiagV{2,3} arguments to prevent breakage.
...
PiperOrigin-RevId: 369056033
Change-Id: Ic2018c297d3dd6f252dc1dd3667f1ed5cb1eaa42
2021-05-19 13:50:11 -07:00
Amit Patankar
0244505991
Fix tf.raw_ops.ResourceCountUpTo null pointer dereference.
...
PiperOrigin-RevId: 368294347
Change-Id: I2c16fbfc9b4966c402c3d8e311f0d665a9c852d8
2021-05-19 13:39:09 -07:00
Amit Patankar
9645ca19de
Fix segfaults in tf.raw_ops.SparseCountSparseOutput.
...
PiperOrigin-RevId: 360547563
Change-Id: I781c7af4b54a63d867c6e18d43a44d64a5c4e7c9
2021-05-19 13:28:18 -07:00
Abin Shahab
bc3d206339
Resolves coredump caused by tf.data.experimental.save with prefetch
...
Repeat and prefetch in combination cause the snapshot reader Initialize function to be invoked multiple times.
However, there is nothing to prefetch on the very last iteration. This results in Prefetch issuing a CancelThreads call while the snapshot thread is trying to initialize. See 6446dda92e/tensorflow/core/kernels/data/prefetch_dataset_op.cc (L151)
Currently the dataset reference counting is done asymmetrically. The reference increment happens at the end of initialization, where as the reference decrement
happens in a destructor. When prefetch cancels the snapshot thread, it errors out of the initialization function. And stops calling the reference increment. However, the reference decrement happens regardless, as it is in the destructor which always is invoked during cleanup. This results in an attempt to decrement the null dataset pointer, and therefore a segmentation fault.
This is different from all other dataset ops, where the dataset reference increment happens in the constructor and the decrement happens in the destructor, which are symmetric.
The solution to this is to ensure that the dataset reference is always initialized to nullptr, and to check for null when decrementing the dataset reference.
2021-05-19 10:04:24 -07:00
Mihai Maruseac
4b2ace809b
Merge pull request #47514 from tensorflow/cherrypick_339370490
...
[Cherrypick:r2.4] Add TPU embedding profile data directory to both TPU estimator and TPU embedding
2021-05-19 08:45:40 -07:00
Mihai Maruseac
42db85a428
Merge pull request #49121 from yangustc07/cherrypicks_WBVJW
...
<release 2.4>-<rc2> cherry-pick request: [tf.data] Fix snapshot segfault when using repeat and prefetch.
2021-05-19 08:44:56 -07:00
Mihai Maruseac
41b3fa3a26
Merge pull request #49290 from geetachavan1/cherrypicks_5BTI0
...
CherryPick:2.4:PR #46974 : Fix crash of tf.strings.substr when pos and len have different shapes
2021-05-19 08:44:26 -07:00
Mihai Maruseac
4695308afc
Merge pull request #49285 from geetachavan1/cherrypicks_TH27G
...
Allowlist certain data types to avoid a seg fault.
2021-05-19 08:43:16 -07:00
Mihai Maruseac
23f9becc2f
Merge pull request #49281 from geetachavan1/cherrypicks_33D59
...
Fix an invalid address vulnerability in `tf.raw_ops.RaggedBincount`.
2021-05-19 08:42:09 -07:00
Geeta Chavan
129827cc80
CherryPick:2.4:PR #46974 : Fix crash of tf.strings.substr when pos and len have different shapes
2021-05-18 18:16:27 -07:00