core: on error, a crash could happen 00/21000/2
authorClement DAVID <clement.david@esi-group.com>
Thu, 6 Jun 2019 19:30:29 +0000 (21:30 +0200)
committerCedric Delamarre <cdl@esi-group.com>
Mon, 15 Jul 2019 16:30:23 +0000 (18:30 +0200)
commit19dd8396d5ebdfb309563e15fd93d868d93cce3a
tree4b9a5758e6c3ecab8fc6fb5db673bbdc5f799059
parent2ea33f118fbcc96414ca3d668b45c7e02c26cf0e
core: on error, a crash could happen

The most trivial example is `atomsInstall non_existing_file` but this
might also crash on inner-function definition/clearing.

On error, the call stack have to be copied to the error stack as values
rather than reference to Callable; on stack return, intermediate
Callable will be release as any other variable and the error stack
printed when hitting either a catch or the top level.

Change-Id: Iac132fb0771057c6364dffe66ca0266d6ea60111
scilab/modules/ast/includes/system_env/configvariable.hxx
scilab/modules/ast/src/cpp/ast/debuggervisitor.cpp
scilab/modules/ast/src/cpp/ast/debugmanager.cpp
scilab/modules/ast/src/cpp/system_env/configvariable.cpp
scilab/modules/core/sci_gateway/cpp/sci_where.cpp
scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp