3 ms·
I've been segfaulting CPython quite a bit with stack underflows while developing a befunge-to-python-bytecode JIT that uses the python stack as the befunge stac
by __s 11y ago
I've been segfaulting CPython quite a bit with stack underflows while developing a befunge-to-python-bytecode JIT that uses the python stack as the befunge stack. It has to include instrumentation to track the stack depth so that it substitutes 0 when the user pops a value on an empty stack. Latest issue was this weekend, reducing the bytecode size of `p` by converting a while loop to move the stack into an array for recompilation to use FOR_ITER, it didn't like being called on non iterables
https://github.com/serprex/Befunge/blob/master/funge.py https://github.com/serprex/Befunge/blob/master/funge.py
It'd be neat to see how PyPy handles fuzzing. It uses CPython's bytecode, I was able to get it to run beer6.bf (it was pretty slow, since that's a benchmark that mostly tests recompile speed) but it locked up when testing mandel.bf (odd since mandel.bf doesn't trigger recompilation)