Baseless Recursion Crash VM
| Project: | GNU Smalltalk |
| Component: | VM |
| Category: | feature |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
An infinite loop will crash the VM.
Simple Example:
sam@osiris:~$ gst
GNU Smalltalk ready
st> Object subclass: Foo [ Foo class >> new [ ^ self new ] ]
st> Foo new
"Global garbage collection... done"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... Segmentation fault (core dumped)
It would be convenient if gst could perform a maximum recursion check
(similar to python) on invoking a CompiledMethod, and signal an Exception if the
(configurable) maximum recursion depth is reached or exceeded.
Updates
| Title: | Infinite Loops Crash VM | » Baseless Recursion Crash VM |
Someone has properly informed me that this is not an infinite loop, but instead is a baseless recursion. (I blame my Scheme background for miscommunicating the issue.)
