Bug #7405
loader command interpreter should reset command_errmsg
100%
Description
The command interpreter does leave command_errmsg as is after printing its content, assuming the next command will reset it in bf_command(). However, in case the forth native word is defined as builtin, the bf_command is not used and forth words will also end up the command_errmsg content printed.
Since command_errmsg is pointer to actual error message, which can be static read only string, we can not just set *command_errmsg = '\0', instead we need to reset the pointer itself.
Reported by Igor Kozhukhov.
Updated by Toomas Soome over 4 years ago
Toomas Soome wrote:
The command interpreter does leave command_errmsg as is after printing its content, assuming the next command will reset it in bf_command(). However, in case the forth native word is defined as builtin, the bf_command is not used and forth words will also end up the command_errmsg content printed.
Since command_errmsg is pointer to actual error message, which can be static read only string, we can not just set *command_errmsg = '\0', instead we need to reset the pointer itself.
Reported by Igor Kozhukhov.
Updated by Electric Monk over 4 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit 32b706a1d3367746e0a3e15c957300631d4013d4
commit 32b706a1d3367746e0a3e15c957300631d4013d4 Author: Toomas Soome <tsoome@me.com> Date: 2016-09-28T19:15:41.000Z 7405 loader command interpreter should reset command_errmsg Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com>