kyren / piccolo

An experimental stackless Lua VM implemented in pure Rust
Creative Commons Zero v1.0 Universal
1.67k stars 62 forks source link

RawTable fmt::Debug implementation can overflow stack #90

Open jihiggins opened 2 months ago

jihiggins commented 2 months ago

When printing a table with {:?}, if it has __index set to itself, it overflows the stack by recursively printing itself

Not entirely sure what the desired behavior should be, especially since the cycles probably won't always be that simple? But right now, debug printing the wrong thing will cause it to crash 😬