TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.histogram_fixed_width` is vulnerable to a crash when the values array contain `Not a Number` (`NaN`) elements. The implementation assumes that all floating point operations are defined and then converts a floating point result to an integer index. If `values` contains `NaN` then the result of the division is still `NaN` and the cast to `int32` would result in a crash. This only occurs on the CPU implementation. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*
D9359D32-D090-44CF-AC43-2046084A28BB
2.6.4
cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*
C4DFBF2D-5283-42F6-8800-D653BFA5CE82
2.7.2
2.7.0
cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*
A58EDA5C-66D6-46F1-962E-60AFB7C784A7
cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*
89522760-C2DF-400D-9624-626D8F160CBA
cpe:2.3:a:google:tensorflow:2.8.0:-:*:*:*:*:*:*
E9EA1898-ACAA-4699-8BAE-54D62C1819FB
cpe:2.3:a:google:tensorflow:2.8.0:rc0:*:*:*:*:*:*
130DE3C9-6842-456F-A259-BF8FF8457217
cpe:2.3:a:google:tensorflow:2.8.0:rc1:*:*:*:*:*:*
BBF2FCEF-989C-409D-9F4C-81418C65B972
cpe:2.3:a:google:tensorflow:2.9.0:rc0:*:*:*:*:*:*
9CFB1CFC-579D-4647-A472-6DE8BE1951DE
cpe:2.3:a:google:tensorflow:2.9.0:rc1:*:*:*:*:*:*
F3F3F37E-D27F-4060-830C-0AFF16150777
OR
<em>Please make sure that this is a bug. As per our
[GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md),
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template</em>

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below):2.1.0
- Python version:3.7.6
- Bazel version (if compiling from source):N/A
- GCC/Compiler version (if compiling from source):N/A
- CUDA/cuDNN version:N/A
- GPU model and memory:N/A


**Describe the current behavior**
`tf.histogram_fixed_width` crashes (segmentation fault) when `values` contain nan

**Describe the expected behavior**
Expect no crash 

**Standalone code to reproduce the issue**
~~~python
import tensorflow as tf
import numpy as np
tf.histogram_fixed_width(values=np.nan, value_range=[1,2])
~~~


Segmentation fault in tf.histogram_fixed_width
This is a GitHub Issue
repo:tensorflow
owner:tensorflow
Title : Segmentation fault in tf.histogram_fixed_width
Issue date:

--- start body ---
<em>Please make sure that this is a bug. As per our
[GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md),
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template</em>

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below):2.1.0
- Python version:3.7.6
- Bazel version (if compiling from source):N/A
- GCC/Compiler version (if compiling from source):N/A
- CUDA/cuDNN version:N/A
- GPU model and memory:N/A


**Describe the current behavior**
`tf.histogram_fixed_width` crashes (segmentation fault) when `values` contain nan

**Describe the expected behavior**
Expect no crash 

**Standalone code to reproduce the issue**
~~~python
import tensorflow as tf
import numpy as np
tf.histogram_fixed_width(values=np.nan, value_range=[1,2])
~~~


--- end body ---

comments :
--- start comments ---

--- end comments ---