Initialize EO::current_frame_idx_m in constructor
authorAjay Jayaraj <ajayj@ti.com>
Thu, 15 Nov 2018 16:50:37 +0000 (10:50 -0600)
committerAjay Jayaraj <ajayj@ti.com>
Thu, 15 Nov 2018 16:50:37 +0000 (10:50 -0600)
commitc6aeb3e9c02b670cce19dedcfe81647516666ffd
tree8c6486e56b394da3c2f5486a06b3e1336c02d582
parentc83243ba4a6a75c9bf6872831cfe33e65f48aa1d
Initialize EO::current_frame_idx_m in constructor

Initialize ExecutionObject::current_frame_idx_m array to 0 in the
ExecutionObject constructor to prevent out of range entries when
recording trace data.

In a pipelined processing loop, the application executes
ExecutionObject::ProcessFrameWait() on the first frame before it calls
ExecutionObject::ProcessFrameStartAsync. The side effect is that the
current_frame_idx_m is not initialized. This can result in negative
frame indices when writing trace data using ReportTrace or UpdateTrace
leading to memory errors.

Setting ExecutionObject::current_frame_idx_m to 0 in the constructor
avoids this scenario.

(MCT-1085)
tidl_api/Makefile
tidl_api/src/execution_object.cpp
tidl_api/src/util.cpp