I know, this is some internal glibc allocation code failing because that request overflowed a buffer on the heap. The bug is, as tptacek mentioned, in the header receiving function [1].
The compilation warnings was an additional remark, I should've phrased that post better.
[1] - https://github.com/riolet/longs/blob/master/wafer.c#L334-337