Menu

#1 Remove Statement Command Causes Dangling Local Variable Expr

v0.1
open
nobody
General (1)
7
2004-02-29
2004-02-29
Bart Jacobs
No

JBeginner 0.1 allows the user to build a malformed
program, by building a method with a return statement
that refers to a local variable, and then removing the
local variable declaration using the Remove Statement
pop-up menu command.

Additional information:

Execution of the return statement causes an unhandled
exception. In JBeginner 0.1, a stack trace is printed on
standard error, but the exception is not reported
through the GUI. As a result, if the user is not watching
the console, the failure is silent.

Mitigating factor:

Undoing the Remove Statement command invocation
using the Undo command seems to restore JBeginner to
a "safe" state, but this is not verified.

Discussion


Log in to post a comment.