@alcinnz Yeah, because yes(1) is just for repeating a line over and over as an answer to a program, which I can entirely see misbehaving with large writes being sent to it.
If you need to write a bunch of stuff in a block device or similar just cp /dev/zero /dev/dest (yup, dd is also useless in 99% of cases)
Specially as their buffer is 8192 bytes rather than 4096.
And even with that, just filling a long buffer and calling write(2) on it shouldn’t have ended up being that complex.