Using "File -> New" to erase the workspace while a procedure is running can crash.
Steps to Reproduce:
1) FOREVER [ IGNORE ISEQ 1 100 ]
2) While that's running, choose File -> New on the main menu
What Happens:
FMSLogo stops working (crashes)
Expected Result:
FMSLogo throws a "I don't know how to ISEQ" error, or something like that.
This is reproducible as far back as MSWLogo. However, because File - New didn't erase ISEQ's buried helper procedures, the repro steps for MSWLogo are:
1) IGNORE ISEQ 1 100 UNBURYALL
2) FOREVER [ IGNORE ISEQ 1 100 ]
3) While that's running, choose File -> New on the main menu
The crash looks like its accessing freed memory.
In eval.cpp in evaluator()
assign(last_line, this_line); assign(this_line, NIL); assign(proc, (is_list(fun) ? anonymous_function(fun) : procnode__caseobj(fun))); assign(list, bodylist__procnode(proc));// get the body ... <--- crash treeify_body(list);
It seems that the proc node has been freed from the 'ISEQ1' object, which is what's in fun.
Interestingly, I cannot reproduce this with ERASE.