Ideally, you'd update the implementation of `getBuff()` so that it allocates an aligned buffer. Note that malloc() always returns aligned buffers, so if you can make it so that the pointer returned by getBuff() is one that was allocated directly by malloc(), then it should work. Probably, though, getBuff() is returning a pointer into some larger buffer that was read off the wire, including some framing bytes that are pushing the data out of alignment. In this case it may be impractical to get the data to come out aligned, so you may have no choice but to make a copy. You can do something like:
auto copy = kj::heapArray<capnp::word>(size / sizeof(capnp::word));
memcpy(copy.begin(), buff, size);
The copy will then be aligned.