[Bug gprofng/32147] [collect app] support external debug info and debuginfod

2024-09-10 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32147

Sam James  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=30194

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


[Bug gprofng/30194] [collect app] Investigate occurrences of @PC from a shared library

2024-09-10 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30194

Sam James  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=32147

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


[Bug gprofng/32147] [collect app] support external debug info and debuginfod

2024-09-10 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32147

--- Comment #2 from Sam James  ---
Also, we install source code to /usr/src/debug (with the help of debugedit).

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


[Bug libctf/32161] New: CTF array dimensions dumped backwards

2024-09-10 Thread bruce.mcculloch at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32161

Bug ID: 32161
   Summary: CTF array dimensions dumped backwards
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: libctf
  Assignee: unassigned at sourceware dot org
  Reporter: bruce.mcculloch at oracle dot com
  Target Milestone: ---

Created attachment 15698
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15698&action=edit
Patch that fixes backwards multidimensional array dumping, plus tests

$ cat array.c
int a[1][2][3]
$ gcc -gctf -o array.o -c array.c
$ objdump --ctf array.o

array.o: file format elf64-x86-64

Contents of CTF section .ctf:

  Header:
Magic number: 0xdff2
Version: 4 (CTF_VERSION_3)
Flags: 0x2 (CTF_F_NEWFUNCINFO)
Compilation unit name: //array.c
Data object section:0x0 -- 0x3 (0x4 bytes)
Object index section:   0x4 -- 0x7 (0x4 bytes)
Variable section:   0x8 -- 0xf (0x8 bytes)
Type section:   0x10 -- 0x77 (0x68 bytes)
String section: 0x78 -- 0x9b (0x24 bytes)

  Labels:

  Data objects:
a -> 0x5: (kind 4) int [3][2][1] (size 0x18) (aligned at 0x4) -> 0x4: (kind
4) int [3][2] (size 0x18) (aligned at 0x4) -> 0x3: (kind 4) int [3] (size 0xc)
(aligned at 0x4) -> 0x1: (kind 1) int (format 0x1) (size 0x4) (aligned at 0x4)

  Function objects:

  Variables:
a -> 0x5: (kind 4) int [3][2][1] (size 0x18) (aligned at 0x4) -> 0x4: (kind
4) int [3][2] (size 0x18) (aligned at 0x4) -> 0x3: (kind 4) int [3] (size 0xc)
(aligned at 0x4) -> 0x1: (kind 1) int (format 0x1) (size 0x4) (aligned at 0x4)

  Types:
0x1: (kind 1) int (format 0x1) (size 0x4) (aligned at 0x4)
0x2: (kind 1) long unsigned int (format 0x0) (size 0x8) (aligned at 0x8)
0x3: (kind 4) int [3] (size 0xc) (aligned at 0x4) -> 0x1: (kind 1) int
(format 0x1) (size 0x4) (aligned at 0x4)
0x4: (kind 4) int [3][2] (size 0x18) (aligned at 0x4) -> 0x3: (kind 4) int
[3] (size 0xc) (aligned at 0x4) -> 0x1: (kind 1) int (format 0x1) (size 0x4)
(aligned at 0x4)
0x5: (kind 4) int [3][2][1] (size 0x18) (aligned at 0x4) -> 0x4: (kind 4)
int [3][2] (size 0x18) (aligned at 0x4) -> 0x3: (kind 4) int [3] (size 0xc)
(aligned at 0x4) -> 0x1: (kind 1) int (format 0x1) (size 0x4) (aligned at 0x4)

  Strings:
0x0: 
0x1: int
0x5: long unsigned int
0x17: a
0x19: //array.c

This behavior occurs as a result of the following patch, which was applied in
gcc 14.2.0:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114186
This patch solves the issue of reversed multidimensional array nelems in the
BTF dumper and in the assembler output, but causes the multidimensional arrays
in CTF to be dumped backwards.

This behavior can also be observed in ctf_get_aname() as well as some other
functions.

The problem lies in ctf_decl_push, and I have a solution as well as some tests.

The issue with this is that if this patch is applied while compiling with a
version of gcc older than 14.2.0, this patch will make the dumper output
backwards. 

The solution to this is either to backport the gcc-14.2.0 patch, or to add a
flag to objdump and libctf.

Patch is attached.

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


[Bug libctf/32161] CTF array dimensions dumped backwards

2024-09-10 Thread indu.bhagat at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32161

Indu Bhagat  changed:

   What|Removed |Added

 CC||indu.bhagat at oracle dot com

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


[Bug libctf/32161] CTF array dimensions dumped backwards

2024-09-10 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32161

Sam James  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=114186,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=116663
 CC||sam at gentoo dot org

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


[Bug gprofng/32096] UBSAN issues in gprofng

2024-09-10 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32096

Vladimir Mezentsev  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #2 from Vladimir Mezentsev  
---
I have fixes for these runtime errors:
  load of value 4294967295, which is not a valid value for type 'Cmsg_warn'
  null pointer passed as argument 2, which is declared to never be null
  load of value 4294967295, which is not a valid value for type 'ProfData_type'
  load of value 4294967295, which is not a valid value for type 'ProfData_type'
  member access within misaligned address 0x0357583c for type 'union
Value', which requires 8 byte alignment
  reference binding to misaligned address 0x0357583c for type 'long
unsigned int', which requires 8 byte alignment


I see other errors like:
 member call on address 0x03192cf0 which does not point to an object of
type 'Vector'
These errors look like a bug in libubsan.
I don't see anything wrong in gprofng.

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