public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "woodard at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/30363] New: Location of return type not tracked in ABI model.
Date: Mon, 17 Apr 2023 14:19:06 +0000	[thread overview]
Message-ID: <bug-30363-9487@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=30363

            Bug ID: 30363
           Summary: Location of return type not tracked in ABI model.
           Product: libabigail
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: woodard at redhat dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

There are cases where the calling convention is different depending on the
return type of a function for example when you have an array of a vector type,
if it is annotated with the vector attribute, it will be passed by value rather
than as a pointer pushed on the stack.

This is further complicated by specific rules about the size of a vector as
presented in the source language in relation to the size of the vector
registers. When this happens it can change the calling convention for the type. 

Unfortunately, compilers do not always get this exactly right:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102027 So you can't just rely on
the faithful implementation of the calling convention within the compiler to
ensure that the vector is stored in the correct location. 

Right now there is no real way, short of binary analysis to determine where the
return type of a subprogram is going to be located. Therefore we cannot detect
these kinds of failures. There is a DWARF issue on this,
https://dwarfstd.org/issues/221105.1.html When this is implemented we should
make use of the location attribute for a subprogram to ensure that the compiler
is putting the return time in the correct place.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2023-04-17 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 14:19 woodard at redhat dot com [this message]
2023-04-18  0:05 ` [Bug default/30363] " woodard at redhat dot com

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-30363-9487@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.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).