public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/30363] New: Location of return type not tracked in ABI model.
@ 2023-04-17 14:19 woodard at redhat dot com
  2023-04-18  0:05 ` [Bug default/30363] " woodard at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: woodard at redhat dot com @ 2023-04-17 14:19 UTC (permalink / raw)
  To: libabigail

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-18  0:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 14:19 [Bug default/30363] New: Location of return type not tracked in ABI model woodard at redhat dot com
2023-04-18  0:05 ` [Bug default/30363] " woodard at redhat dot com

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).