Dwarves debugging tools
 help / color / mirror / Atom feed
* pahole Version 1.25-4 dumps
@ 2024-02-26  8:09 J B
  2024-02-27 13:14 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: J B @ 2024-02-26  8:09 UTC (permalink / raw)
  To: dwarves

H,i
some random tests:

$ ls test.txt
/usr/bin/ls: cannot access 'test.txt': No such file or directory
$ syscse test.txt
Segmentation fault (core dumped)
$ coredumpctl info
       Signal: 11 (SEGV)
                Stack trace of thread 48074:
                #0  0x00007624fb32430b n/a (libdwarves.so.1 + 0x5b30b)
                #1  0x00007624fb30b2ff cus__load_file (libdwarves.so.1 + 0x422f>
                #2  0x00007624fb312af9 cus__load_files (libdwarves.so.1 + 0x49a>
                #3  0x000063ada590a093 main (syscse + 0x1093)
                #4  0x00007624fb10ccd0 n/a (libc.so.6 + 0x25cd0)
                #5  0x00007624fb10cd8a __libc_start_main (libc.so.6 + 0x25d8a)
                #6  0x000063ada590a165 _start (syscse + 0x1165)
                ELF object binary architecture: AMD x86-64
$ touch test.txt
$ syscse test.txt
Segmentation fault (core dumped)
$ <as above>
$ syscse /boot/vmlinuz-linux
Segmentation fault (core dumped)
$ <as above>

jb

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

* Re: pahole Version 1.25-4 dumps
  2024-02-26  8:09 pahole Version 1.25-4 dumps J B
@ 2024-02-27 13:14 ` Arnaldo Carvalho de Melo
  2024-02-27 13:42   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-02-27 13:14 UTC (permalink / raw)
  To: J B; +Cc: dwarves

On Mon, Feb 26, 2024 at 09:09:34AM +0100, J B wrote:
> H,i
> some random tests:

⬢[acme@toolbox pahole]$ git diff
diff --git a/syscse.c b/syscse.c
index 4a5b199b7a636b9f..b09c8564759dab76 100644
--- a/syscse.c
+++ b/syscse.c
@@ -18,6 +18,12 @@
 static const char *prefix = "sys_";
 static size_t prefix_len = 4;
 
+static struct conf_fprintf conf;
+
+static struct conf_load conf_load = {
+        .conf_fprintf = &conf,
+};
+
 static bool filter(struct function *f)
 {
        if (f->proto.nr_parms != 0) {
@@ -156,7 +162,7 @@ int main(int argc, char *argv[])
                 argp_help(&argp, stderr, ARGP_HELP_SEE, argv[0]);
                 return EXIT_FAILURE;
        }
-       err = cus__load_files(cus, NULL, argv + remaining);
+       err = cus__load_files(cus, &conf_load, argv + remaining);
        if (err != 0) {
                cus__fprintf_load_files_err(cus, "syscse", argv + remaining, err, stderr);
                return EXIT_FAILURE;
⬢[acme@toolbox pahole]$ syscse bla
syscse: bla: Invalid argument
⬢[acme@toolbox pahole]$ syscse blaadsfafa
syscse: blaadsfafa: Invalid argument
⬢[acme@toolbox pahole]$

At some point conf_load became non-optional for:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f4b1ed in dwarf__load_file (cus=0x4052a0, conf=0x0, filename=0x7fffffffe4c3 "bla") at /home/acme/git/pahole/dwarf_loader.c:3626
3626		if (conf->max_hashtable_bits != 0) {
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.8-16.fc39.x86_64 elfutils-libelf-0.190-4.fc39.x86_64 elfutils-libs-0.190-4.fc39.x86_64 glibc-2.38-16.fc39.x86_64 libgcc-13.2.1-6.fc39.x86_64 libzstd-1.5.5-4.fc39.x86_64 xz-libs-5.4.4-1.fc39.x86_64 zlib-1.2.13-4.fc39.x86_64
(gdb) bt
#0  0x00007ffff7f4b1ed in dwarf__load_file (cus=0x4052a0, conf=0x0, filename=0x7fffffffe4c3 "bla") at /home/acme/git/pahole/dwarf_loader.c:3626
#1  0x00007ffff7f310f5 in cus__load_file (cus=0x4052a0, conf=0x0, filename=0x7fffffffe4c3 "bla") at /home/acme/git/pahole/dwarves.c:2074
#2  0x00007ffff7f31ca1 in cus__load_files (cus=0x4052a0, conf=0x0, filenames=0x7fffffffe1c0) at /home/acme/git/pahole/dwarves.c:2577
#3  0x000000000040177a in main (argc=2, argv=0x7fffffffe1b8) at /home/acme/git/pahole/syscse.c:159
(gdb)

Thanks for the report, I'll add it.

- Arnaldo
 
> $ ls test.txt
> /usr/bin/ls: cannot access 'test.txt': No such file or directory
> $ syscse test.txt
> Segmentation fault (core dumped)
> $ coredumpctl info
>        Signal: 11 (SEGV)
>                 Stack trace of thread 48074:
>                 #0  0x00007624fb32430b n/a (libdwarves.so.1 + 0x5b30b)
>                 #1  0x00007624fb30b2ff cus__load_file (libdwarves.so.1 + 0x422f>
>                 #2  0x00007624fb312af9 cus__load_files (libdwarves.so.1 + 0x49a>
>                 #3  0x000063ada590a093 main (syscse + 0x1093)
>                 #4  0x00007624fb10ccd0 n/a (libc.so.6 + 0x25cd0)
>                 #5  0x00007624fb10cd8a __libc_start_main (libc.so.6 + 0x25d8a)
>                 #6  0x000063ada590a165 _start (syscse + 0x1165)
>                 ELF object binary architecture: AMD x86-64
> $ touch test.txt
> $ syscse test.txt
> Segmentation fault (core dumped)
> $ <as above>
> $ syscse /boot/vmlinuz-linux
> Segmentation fault (core dumped)
> $ <as above>
> 
> jb
> 

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

* Re: pahole Version 1.25-4 dumps
  2024-02-27 13:14 ` Arnaldo Carvalho de Melo
@ 2024-02-27 13:42   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-02-27 13:42 UTC (permalink / raw)
  To: J B; +Cc: dwarves

On Tue, Feb 27, 2024 at 10:14:48AM -0300, Arnaldo Carvalho de Melo wrote:
> On Mon, Feb 26, 2024 at 09:09:34AM +0100, J B wrote:
> > H,i
> > some random tests:
> 
> At some point conf_load became non-optional for:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7f4b1ed in dwarf__load_file (cus=0x4052a0, conf=0x0, filename=0x7fffffffe4c3 "bla") at /home/acme/git/pahole/dwarf_loader.c:3626
> 3626		if (conf->max_hashtable_bits != 0) {
> Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.8-16.fc39.x86_64 elfutils-libelf-0.190-4.fc39.x86_64 elfutils-libs-0.190-4.fc39.x86_64 glibc-2.38-16.fc39.x86_64 libgcc-13.2.1-6.fc39.x86_64 libzstd-1.5.5-4.fc39.x86_64 xz-libs-5.4.4-1.fc39.x86_64 zlib-1.2.13-4.fc39.x86_64
> (gdb) bt
> #0  0x00007ffff7f4b1ed in dwarf__load_file (cus=0x4052a0, conf=0x0, filename=0x7fffffffe4c3 "bla") at /home/acme/git/pahole/dwarf_loader.c:3626
> #1  0x00007ffff7f310f5 in cus__load_file (cus=0x4052a0, conf=0x0, filename=0x7fffffffe4c3 "bla") at /home/acme/git/pahole/dwarves.c:2074
> #2  0x00007ffff7f31ca1 in cus__load_files (cus=0x4052a0, conf=0x0, filenames=0x7fffffffe1c0) at /home/acme/git/pahole/dwarves.c:2577
> #3  0x000000000040177a in main (argc=2, argv=0x7fffffffe1b8) at /home/acme/git/pahole/syscse.c:159
> (gdb)
> 
> Thanks for the report, I'll add it.

Here are the csets, pushed out now:

⬢[acme@toolbox pahole]$ git log --oneline -3
90201c2bde4b0ca8 (HEAD -> master) prefcnt: cus__load_files() requires a non NULL conf_load
f86ed770b5396cd5 dtagnames: cus__load_files() requires a non NULL conf_load
b2e0f084eca03613 syscse: cus__load_files() requires a non NULL conf_load
⬢[acme@toolbox pahole]$ 

Thanks,

- Arnaldo

> > $ touch test.txt
> > $ syscse test.txt
> > Segmentation fault (core dumped)
> > $ <as above>
> > $ syscse /boot/vmlinuz-linux
> > Segmentation fault (core dumped)
> > $ <as above>
> > 
> > jb
> > 
> 

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

end of thread, other threads:[~2024-02-27 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26  8:09 pahole Version 1.25-4 dumps J B
2024-02-27 13:14 ` Arnaldo Carvalho de Melo
2024-02-27 13:42   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox