public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "simon at pushface dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/66162] segfault on code using controlled types in -gnatc mode
Date: Tue, 02 Jun 2015 11:36:00 -0000	[thread overview]
Message-ID: <bug-66162-4-j3eMm95XOQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66162-4@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3582 bytes --]

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: <gcc-bugs-return-487825-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.gnu.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: <bug-66378-4@http.gcc.gnu.org/bugzilla/>
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.


  parent reply	other threads:[~2015-06-02 11:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 15:52 [Bug ada/66162] New: Bug box compiling Ada.Finalization with -gnatc simon at pushface dot org
2015-05-17 10:39 ` [Bug ada/66162] " simon at pushface dot org
2015-05-17 12:57 ` ebotcazou at gcc dot gnu.org
2015-05-17 14:37 ` simon at pushface dot org
2015-05-17 15:22 ` [Bug ada/66162] segfault on code using controlled types in -gnatc mode ebotcazou at gcc dot gnu.org
2015-06-02 11:36 ` simon at pushface dot org [this message]
2015-06-02 16:49 ` ebotcazou at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66162-4-j3eMm95XOQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).