temporarily use a pinned byte array to avoid a segmentation fault