pahole 1.27 segfaults when generating BTF for modules built with LTO
nathanchance opened this issue · 8 comments
This was initially reported at https://gitlab.archlinux.org/archlinux/packaging/packages/pahole/-/issues/1. See my upstream report for more information: https://lore.kernel.org/20240613214019.GA1423015@thelio-3990X/
A patch now exists for this: https://lore.kernel.org/all/ZnCWRMfRDMHqSxBb@x1/
Did you try LATEST pahole.git#next in this scenario?
commit 3801aa0c1174db56540a84947a568bd918730ea4
("dwarf_loader: Remove 'struct dwarf_tag' variable size")
The patch is accepted, so the next branch is fixed. It hasn’t been released though, so I am keeping the issue open until then.
What is your suggestion?
pahole version 1.27 plus above patch only?
Use v1.26?
Here pahole-v1.27-7-g693522ee3a94
is the last working version.
I would either stick with 1.26 or checkout and build at 94a01bde592c555b3eb526aeb4c2ad695c5660d8, which is effectively what Arch Linux did: https://gitlab.archlinux.org/archlinux/packaging/packages/pahole/-/commit/505221149a546ad608db56aa3465380a8bff0690.
OK, thanks.
This is pahole v1.27-3-g94a01bde592c
:
commit 94a01bde592c
("dwarf_loader: Add missing cus__add(cus, cu) to cus__merge_and_process_cu()")
With a selfmade pahole version v1.27-3-g94a01bde592c
:
[ start-build.txt ]
dileks 54335 54326 0 20:35 tty4 00:00:00 /usr/bin/perf stat make V=1 -k -j4 ARCH=x86_64 LLVM=1 LLVM=/opt/llvm/bin/ PAHOLE=/opt/pahole/bin/pahole KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@gmail.com KBUILD_BUILD_TIMESTAMP=2024-07-24 KDEB_PKGVERSION=6.10.1-1~trixie+dileks1 LOCALVERSION=-1-amd64-clang18-kcfi olddefconfig bindeb-pkg
root@iniza:~# cat /proc/version
Linux version 6.10.1-1-amd64-clang18-kcfi (sedat.dilek@gmail.com@iniza) (ClangBuiltLinux clang version 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff), ClangBuiltLinux LLD 18.1.8) #1~trixie+dileks1 SMP PREEMPT_DYNAMIC 2024-07-24