From: 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 3 Sep 2019 00:36:24 +0000 (+0900) Subject: Fix deref null pointer error on scheduler (#7094) X-Git-Tag: accepted/tizen/unified/20190903.052428~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d922993de5f91ecadeb204529e80390b226666a;p=platform%2Fcore%2Fml%2Fnnfw.git Fix deref null pointer error on scheduler (#7094) Change to runtime error instead of assert for deref null pointer error on scheduler Signed-off-by: Hyeongseok Oh --- diff --git a/runtimes/neurun/core/src/compiler/Scheduler.cc b/runtimes/neurun/core/src/compiler/Scheduler.cc index 6a7ae58..96c1d42 100644 --- a/runtimes/neurun/core/src/compiler/Scheduler.cc +++ b/runtimes/neurun/core/src/compiler/Scheduler.cc @@ -431,7 +431,10 @@ void Scheduler::scheduleNode(const model::OperationIndex &index) } } - assert(chosen_backend != nullptr); + if (chosen_backend == nullptr) + { + throw std::runtime_error{"Fail to choose backend on scheduler"}; + } for (const auto &it : selected_transfer_st_exec_time) {