https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66162 --- Comment #6 from simon at pushface dot org --- (In reply to Eric Botcazou from comment #3) > That's not the problem., just avoid using -gnatc on the runtime. Eric, In PR64866 comment 2, Arno said "Visibility in the Ada runtime do not follow standard Ada rules. In other words, the Ada runtime isn't implemented in Ada, but in a different dialect very close to Ada, with additional restrictions.” He notes two of the additional restrictions: is there a writeup anywhere of the language restrictions and usage restrictions like this one? Thanks, --S >From gcc-bugs-return-487825-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 02 11:48:40 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 98032 invoked by alias); 2 Jun 2015 11:48:40 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 97865 invoked by uid 48); 2 Jun 2015 11:48:36 -0000 From: "mvo at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/66378] New: libgo syscall.Sendfile() does not honor/use offset argument Date: Tue, 02 Jun 2015 11:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 5.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mvo at debian dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_file_loc bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00157.txt.bz2 Content-length: 1121 https://gcc.gnu.org/bugzilla/show_bug.cgi?idf378 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?id5676&actioníit 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.