Merge "fix some bugs in SharedBufferStack::resize" into kraken