[Test/RepoRnn] handle the uninitialized output buffer submit/tizen/20190321.034934
authorDongju Chae <dongju.chae@samsung.com>
Wed, 20 Mar 2019 06:46:17 +0000 (15:46 +0900)
committerwooksong <wook16.song@samsung.com>
Wed, 20 Mar 2019 07:26:52 +0000 (16:26 +0900)
In tizen, this uninitialized output buffer sometimes causes a wrong result

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
nnstreamer_example/custom_example_RNN/dummy_RNN.c

index 796f7e0..bf4afa3 100644 (file)
@@ -135,6 +135,8 @@ pt_invoke (void *private_data, const GstTensorFilterProperties * prop,
   if (!in0 || !in1 || !out)
     return -EINVAL;
 
+  memset (out, 0, output[0].size);
+
   for (h = 0; h < 4; h++) {
     w = 0;
     memcpy (&(out[location (0, w, h)]), &(in0[location (0, w, h)]), TSIZE);