Dynamically expand the buffer for stack traces