Post Reply 
50g User RPL crasher (don't do this!)
08-05-2017, 06:07 PM
Post: #4
RE: 50g User RPL crasher (don't do this!)
This is an interesting bug.

You can see it in a number of different ways, but I believe the salient pieces to make this happen are the following:

- You must VISIT a saved global with an otherwise empty stack (with VISIT, VISITB, or LS-DOWNARROW). All of these commands call the same internal routine (CharEdit). The empty stack issue is explained below.

- A simple form of the "offending" object is:
Code:
→ X « »
You can type that in while editing any object; it doesn't have to already exist in the saved function. Anything after the above code won't matter, but anything prior to it will possibly make a difference.

- You have to press "ENTER" while editing the object, which would normally result in the newly-edited object being saved into the global variable.

The problem seems to be related to the "→" actually getting executed (though it's not clear to me why that actually happens). It causes a loss of at least one item from the stack at a time when CharEdit isn't expecting that to occur. This ends up resulting in 1 or more items being missing from the stack that were supposed to be present, which in turn results in an attempt to drop stack items that aren't actually there. While the UserRPL DROP commands check the stack depth before proceeding, the SysRPL DROP commands do not. The crash happens because code was executed to drop items beyond the quantity that actually existed, which becomes evident as soon as you do anything to change the stack after executing the above steps.

You can see this in action by loading several items on the stack before attempting the "offending" steps, or alternatively by placing items on the stack in the edited object prior to the "→" command. Looking at the stored results in the global variable in those scenarios gives a clue to the "misalignment" of stack objects that happens.

Bottom line: don't do it. Smile I can't imagine that we will ever see another firmware update to the 50g at this point.

Just curious: what is the goal of your experiments with a "naked lambda"? What are you trying to accomplish with this?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 50g User RPL crasher (don't do this!) - DavidM - 08-05-2017 06:07 PM



User(s) browsing this thread: 1 Guest(s)