Project

General

Profile

Bug #7405

loader command interpreter should reset command_errmsg

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2016-09-26
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

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.

History

#1

Updated by Toomas Soome about 3 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.

https://www.illumos.org/rb/r/220/

#2

Updated by Electric Monk about 3 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>

Also available in: Atom PDF