https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66378
Bug ID: 66378 Summary: libgo syscall.Sendfile() does not honor/use offset argument Product: gcc Version: 5.1.1 URL: https://bugs.launchpad.net/snappy/+bug/1460530 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: mvo at debian dot org CC: cmang at google dot com Target Milestone: --- Created attachment 35676 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35676&action=edit Patch that make syscall.Sendfile() use offset. The implementation in libgo/go/syscall/libcall_linux.go does not use the "offset" argument. Instead it uses soff and poff which is never initialized with the offset provided by the user (so always zero). This means that sendfile will not be correct for any offset != 0. Attached is a patch that fixes this issue, I verified the fix against our failing snappy testsuite that has a test for sendfile with alternative offsets.