Dialog and Å-machine bugs

Entering one very long word into dgdebug or the JS Å-machine interpreter exhausts the heap space. dgdebug will attempt to undo moves until the program eventually suspends. The JS interpreter is a bit different. Taking Tethered (running on Linus’s website) as an example, on the first move:

  • if a word of length 569 to 585 is entered, the heap will be exhausted, but the interpreter will be able to undo.
  • For words of length 586 to 614, the undo will fail and the interpreter will freeze.
  • For words of length 615 and above, an error is thrown in the console (ReferenceError: HEAPFULL is not defined) and the page refreshes.

For reference, I tested this in Firefox 70.0.1 and Chromium 78.0.3904.97.

It also seems like pressing the any of Delete, Insert, Page Up, or Page Down keys in dgdebug prints a tilde instead of deleting a character. I’m not sure if this is a problem with my system, but the delete key seems to work fine everywhere else, and the same behavior happens in both xterm and termite.

Thanks for reporting! There should probably be a reasonable limit enforced by the input field in the web interpreter. But I’ll fix the underlying problem first.

The problem with special input keys is due to custom line-editing code in dgdebug. I’ll fix that too.

1 Like