$ dtagnames --help > Segmentation fault (core dumped) #0 cus__load_file (cus=cus@entry=0x55fd47794c40, conf=conf@entry=0x0, filename=0x7ffd6dc7e048 "--help") at /usr/src/debug/dwarves-1.15-3.fc31.x86_64/dwarves.c:1743 #1 in cus__load_files (cus=0x55fd47794c40, conf=0x0, filenames=0x7ffd6dc7c120) at /usr/src/debug/dwarves-1.15-3.fc31.x86_64/dwarves.c:2109 #2 in main (argc=<optimized out>, argv=0x7ffd6dc7c118) at /usr/src/debug/dwarves-1.15-3.fc31.x86_64/dtagnames.c:50 The problem is not primarily in dealing with customary switches as if they were arguments/file names (put anything you like in place of --help, e.g. /dev/null or doodly doo [2 args]), but rather in the inconsistent treatment of NULL pointer situation: 1702│ int cus__load_file(struct cus *cus, struct conf_load *conf, 1703│ const char *filename) 1704│ { 1705│ int i = 0, err = 0; 1706│ int loader; 1707│ 1708│ if (conf && conf->format_path != NULL) { ^^^^ 1709│ char *fpath = strdup(conf->format_path); 1710│ if (fpath == NULL) 1711│ return -ENOMEM; 1712│ char *fp = fpath; 1713│ while (1) { 1714│ char *sep = strchr(fp, ','); 1715│ 1716│ if (sep != NULL) 1717│ *sep = '\0'; 1718│ 1719│ err = -ENOTSUP; 1720│ loader = debugging_formats__loader(fp); 1721│ if (loader == -1) 1722│ break; 1723│ 1724│ if (conf->conf_fprintf) 1725│ conf->conf_fprintf->has_alignment_info = debug_fmt_table[loader]->has_alignment_info; 1726│ 1727│ err = 0; 1728│ if (debug_fmt_table[loader]->load_file(cus, conf, 1729│ filename) == 0) 1730│ break; 1731│ 1732│ err = -EINVAL; 1733│ if (sep == NULL) 1734│ break; 1735│ 1736│ fp = sep + 1; 1737│ } 1738│ free(fpath); 1739│ return err; 1740│ } 1741│ 1742│ while (debug_fmt_table[i] != NULL) { 1743├> if (conf->conf_fprintf) ^^^^ 1744│ conf->conf_fprintf->has_alignment_info = debug_fmt_table[i]->has_alignment_info; Note that conf is indeed NULL in this segfaulting case of execution. And I still don't know what dtagnames is meant to be good for :-) $ rpm -q $(rpm -qf $(which dtagnames)) libdwarves1 > dwarves-1.15-3.fc31.x86_64 > libdwarves1-1.15-3.fc31.x86_64
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
It just shows the names of the tags it finds in a file, to help debug the tools, please try with the attached patch, with it I get: [acme@quaco pahole]$ dtagnames | sort | uniq -c | sort -nr size: 19015872 58928 member 42814 formal_parameter 21734 subprogram 16679 subroutine_type 13398 enumerator 13226 pointer_type 8928 structure_type 3046 array_type 2628 const_type 1861 typedef 1586 enumeration_type 991 union_type 23 volatile_type 16 base_type [acme@quaco pahole]$
Created attachment 1662517 [details] Fix for the reported bug.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.