Closed xgreenx closed 7 months ago
There's a subtle bug in the implementation here: It's possible to extend the stack, then shrink the stack, and then extend the heap to be where the stack once was. Then reading from that memory area would read from the memory that was in the stack, and not from the heap that's on that region now. Fortunately we never shrink the heap, so just truncating the `stack´ field every time we grow heap over it fixes that.
Fixed in 10fed83b
Another breaking change: Allocating new heap space with ALOC now zeroes memory.
Closes https://github.com/FuelLabs/fuel-vm/issues/452
Spec PR: https://github.com/FuelLabs/fuel-specs/pull/566