New release: v1.31

update dwarves package to release v1.31
This commit is contained in:
Gregory Bell 2025-12-01 12:43:15 -05:00
parent 132c3fabc7
commit 2468aa98cc
4 changed files with 22 additions and 99 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/dwarves-1.25.tar.xz
/dwarves-1.27.tar.xz
/dwarves-1.30.tar.xz
/dwarves-1.31.tar.xz

View File

@ -1,94 +0,0 @@
From b1412a88bb616f449401be285d43b028962992b9 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Mon, 1 Jul 2019 11:37:40 -0300
Subject: [PATCH 1/1] fprintf: Fixup handling classes with no members
Will Cohen reported this NULL pointer dereference while processing some
object linking with cuda:
#0 0x00007ffff7f91453 in __class__fprintf (class=0x522560, cu=0x40ff80, conf=0x7fffffffa930, fp=0x7ffff7ece780 <_IO_2_1_stdout_>)
at /home/acme/git/pahole/dwarves_fprintf.c:1624
#1 0x00007ffff7f92195 in tag__fprintf (tag=0x522560, cu=0x40ff80, conf=0x7fffffffa930, fp=0x7ffff7ece780 <_IO_2_1_stdout_>)
at /home/acme/git/pahole/dwarves_fprintf.c:1835
#2 0x00007ffff7f90b57 in __class__fprintf (class=0x5224c0, cu=0x40ff80, conf=0x7fffffffaaa0, fp=0x7ffff7ece780 <_IO_2_1_stdout_>)
at /home/acme/git/pahole/dwarves_fprintf.c:1406
#3 0x00007ffff7f92195 in tag__fprintf (tag=0x5224c0, cu=0x40ff80, conf=0x40a200 <conf>, fp=0x7ffff7ece780 <_IO_2_1_stdout_>)
at /home/acme/git/pahole/dwarves_fprintf.c:1835
#4 0x0000000000402d03 in class_formatter (class=0x5224c0, cu=0x40ff80, id=1257) at /home/acme/git/pahole/pahole.c:224
#5 0x0000000000403074 in print_classes (cu=0x40ff80) at /home/acme/git/pahole/pahole.c:319
#6 0x0000000000404bb2 in pahole_stealer (cu=0x40ff80, conf_load=0x40a240 <conf_load>) at /home/acme/git/pahole/pahole.c:1174
#7 0x00007ffff7f9ff73 in finalize_cu (cus=0x40b2b0, cu=0x40ff80, dcu=0x7fffffffacf0, conf=0x40a240 <conf_load>)
at /home/acme/git/pahole/dwarf_loader.c:2227
#8 0x00007ffff7f9ffac in finalize_cu_immediately (cus=0x40b2b0, cu=0x40ff80, dcu=0x7fffffffacf0, conf=0x40a240 <conf_load>)
at /home/acme/git/pahole/dwarf_loader.c:2236
#9 0x00007ffff7fa064c in cus__load_module (cus=0x40b2b0, conf=0x40a240 <conf_load>, mod=0x40d760, dw=0x40e980, elf=0x40b360,
filename=0x7fffffffd5e3 "examples/wcohen/02_Exercise.cuda") at /home/acme/git/pahole/dwarf_loader.c:2389
#10 0x00007ffff7fa0760 in cus__process_dwflmod (dwflmod=0x40d760, userdata=0x40d770, name=0x40d910 "examples/wcohen/02_Exercise.cuda",
base=4194304, arg=0x7fffffffcf10) at /home/acme/git/pahole/dwarf_loader.c:2434
#11 0x00007ffff7f32be1 in dwfl_getmodules () from /lib64/libdw.so.1
#12 0x00007ffff7fa0820 in cus__process_file (cus=0x40b2b0, conf=0x40a240 <conf_load>, fd=3,
filename=0x7fffffffd5e3 "examples/wcohen/02_Exercise.cuda") at /home/acme/git/pahole/dwarf_loader.c:2487
#13 0x00007ffff7fa089c in dwarf__load_file (cus=0x40b2b0, conf=0x40a240 <conf_load>, filename=0x7fffffffd5e3 "examples/wcohen/02_Exercise.cuda")
at /home/acme/git/pahole/dwarf_loader.c:2504
#14 0x00007ffff7f8b0dd in cus__load_file (cus=0x40b2b0, conf=0x40a240 <conf_load>, filename=0x7fffffffd5e3 "examples/wcohen/02_Exercise.cuda")
at /home/acme/git/pahole/dwarves.c:1745
#15 0x00007ffff7f8bc2a in cus__load_files (cus=0x40b2b0, conf=0x40a240 <conf_load>, filenames=0x7fffffffd150)
at /home/acme/git/pahole/dwarves.c:2109
#16 0x0000000000404ff0 in main (argc=2, argv=0x7fffffffd148) at /home/acme/git/pahole/pahole.c:1294
(gdb)
(gdb) p class__name(class, cu)
$6 = 0x5cbb85 "__nv_hdl_helper_trait<__nv_dl_tag<int (*)(int, char**), main, 1u>, void (main(int, char**)::__lambda0::*)(int, double&)const>"
(gdb) p class->type.nr_members
$7 = 0
(gdb) p last
$8 = (struct class_member *) 0x0
(gdb)
So, before checking for bitfield details, first check if there were
members.
Now, if we show all structs/classes in that object file and look for the
above data structure, we find it inside another:
$ pahole examples/wcohen/02_Exercise.cuda
<SNIP>
struct __nv_hdl_helper_trait_outer<false, false, int, Kokkos::View<double**>, Kokkos::View<double*>, Kokkos::View<double*> > {
struct __nv_hdl_helper_trait<__nv_dl_tag<int (*)(int, char**), main, 1u>, void (main(int, char**)::__lambda0::*)(int, double&)const> {
class __nv_hdl_wrapper_t<false, false, __nv_dl_tag<int (*)(int, char**), main, 1u>, void(int, double&), int, Kokkos::View<doubl get<main(int, char**)::__lambda0>(class __lambda0, int, class View<double**>, class View<double*>, class View<double*>);
/* size: 1, cachelines: 0, members: 0 */
/* padding: 1 */
/* last cacheline: 1 bytes */
};
/* size: 1, cachelines: 0, members: 0 */
/* padding: 1 */
/* last cacheline: 1 bytes */
};
<SNIP>
$
Reported-by: William Cohen <wcohen@redhat.com>
Fixes: 13e5b9fc00ee ("fprintf: Add unnamed bitfield padding at the end to rebuild original type")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
dwarves_fprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dwarves_fprintf.c b/dwarves_fprintf.c
index 8ad1ced7840c..706f1b5033f5 100644
--- a/dwarves_fprintf.c
+++ b/dwarves_fprintf.c
@@ -1620,7 +1620,7 @@ static size_t __class__fprintf(struct class *class, const struct cu *cu,
* to avoid adding the forced bitfield paddings and have btfdiff happy.
*/
if (class->padding != 0 && type->alignment == 0 && cconf.has_alignment_info &&
- !cconf.suppress_force_paddings) {
+ !cconf.suppress_force_paddings && last != NULL) {
tag_pos = cu__type(cu, last->tag.type);
size = tag__size(tag_pos, cu);
--
2.20.1

View File

@ -2,7 +2,7 @@
%define libver 1
Name: dwarves
Version: 1.30
Version: 1.31
Release: 1%{?dist}
License: GPLv2
Summary: Debugging Information Manipulation Tools (pahole & friends)
@ -80,9 +80,7 @@ rm -Rf %{buildroot}
%files
%doc README.ctracer
%doc README.btf
%doc changes-v1.28
%doc changes-v1.29
%doc changes-v1.30
%doc changes-v1.31
%doc NEWS
%{_bindir}/btfdiff
%{_bindir}/codiff
@ -134,6 +132,24 @@ rm -Rf %{buildroot}
%{_libdir}/%{libname}_reorganize.so
%changelog
* Mon Dec 1 2025 Gregory Bell <grbell@redhat.com> - 1.31-1
- Rework the selection of functions to represent in BTF, for instance:
- Skip functions that passes values thru the stack when those structs don't
have expected alignment due to some attribute usage that then causes
problems with BTF trampolines due to lack of expressiveness in BTF to
signal such special cases.
- Skip objects (compile units) without DWARF: don't stop a multi object
encoding session just because one doesn't have any DWARF in it.
- Fix BTF dedup by updating libbpf.
- Fix the inference of the explicit alignment attribute of zero length arrays,
like struct skb_ext->data[] in the Linux kernel. Important as BTF has no no
explicit alignment attribute encoding.
- Fix the inference of alignments after bitfields, such as in struct
nft_rule_dp->data[] after ->handle:42, also in the Linux kernel.
- Fix segfault with --show_reorg_steps option, e.g. pahole -R -S -C task_struct.
- Add comparision of functions encoded in BTF between baseline 'master' branch
and current branch, i.e. 'next'.
* Fri Jun 20 2025 Gregory Bell <grbell@redhat.com> - 1.30-1
- New release: 1.30
- Better detection of abort during DWARF loader thread processing

View File

@ -1 +1 @@
SHA512 (dwarves-1.30.tar.xz) = 222ad1f8e7bd4e079b4bf9059eaadebc23a0f4a95a77374b1162a1704acdceb794743e61bc14ec1cbda9a7c686f6972c243e784aeedf39cc15b6a8c6a4f1e2eb
SHA512 (dwarves-1.31.tar.xz) = 0761159c6e0400b32761c7497a2dde2f0ba1992a381480c2a20c33e3aceafeb3a1a7d58ecc3a8ae236a2dc5b4eca0ed38b5fc9b13a83cfc1e6b980ccf835214e