aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/overflow_test.cc
Commit message (Collapse)AuthorAge
* Use a simpler threshold in MultiplyWithoutOverflowGravatar Geoffrey Irving2017-03-31
| | | | | We only need to worry about overflowing uint64, not int64. Change: 151836590
* Remove 2**40 size limit on TensorShape and harden to overflowGravatar Geoffrey Irving2017-03-30
The limit was preventing valid uses of TensorShape as the dense shape of very large sparse tensors. There's no security advantage to the limit, since a memory allocation of 2**40 bytes is already far beyond a reasonable machine size. The new limit is std::numeric_limits<int64>::max(). In addition, the previous TensorShape code did not check for overflow when multiplying, which meant an operation as simple as tf.gather(tf.zeros([2**5, 2**60 + 1]), 7).eval() would appear as valid during TensorShape construction and then crash. A new MultiplyWithoutOverflow function does the correct overflow checking. Fixes #8494. Change: 151778176