bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gprofng/29350] New: Incorrect function name assigned


From: ruud.vanderpas at oracle dot com
Subject: [Bug gprofng/29350] New: Incorrect function name assigned
Date: Mon, 11 Jul 2022 03:46:13 +0000

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

            Bug ID: 29350
           Summary: Incorrect function name assigned
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gprofng
          Assignee: vladimir.mezentsev at oracle dot com
          Reporter: ruud.vanderpas at oracle dot com
  Target Milestone: ---

The gp-display-text tool assigns an incorrect name to a function. This is a
snippet from the source listing as produced with the source command from
gp-display-text:

 184. MEM_STATIC unsigned MEM_64bits(void) { return sizeof(size_t)==8; }
 185.
      <Function: MEM_64bits>
 186. MEM_STATIC unsigned MEM_isLittleEndian(void)
 187. {
 188.     const union { U32 u; BYTE c[4]; } one = { 1 };   /* don't use static
: performance detrimental  */
 189.     return one.c[0];
 190. }

Note that function MEM_isLittleEndian is labeled as MEM_64bits.

In the output of the fsummary command, I see this. Note that I removed the path
names:

MEM_64bits
        Exclusive Total CPU Time:  1.551 (  2.1%)
        Inclusive Total CPU Time:  1.551 (  2.1%)
                            Size:      6
                      PC Address: 12:0x00028b00
                     Source File: <path removed>
                     Object File: <path removed>
                     Load Object: <path removed>
                    Mangled Name:
                         Aliases: MEM_isLittleEndian

I'm not sure if this is indeed an alias for the same function though.

This code cannot be shared easily, but I can prepare a test case. Let me know
if there is interest in this.

I observed this problem with various gcc releases by the way. I'm using an OCI
instance with a Haswell processor, running Oracle Linux 8:

Linux <instance name> 5.4.17-2102.202.5.el8uek.x86_64 #2 SMP Sat May 22
16:16:03 PDT 2021 x86_64 x86_64 x86_64 GNU/Linux

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]