segfault, resizing may move the buffer