Commit Graph

7 Commits

Author SHA1 Message Date
Kazuhito Hagio
7591e3c07c Fix gcc-11 compiler warning on makedumpfile.c
Without the patch, the following gcc-11 compiler warning is emitted for
makedumpfile.c:

In function 'flattened_format_get_osrelease',
    inlined from 'check_flattened_format' at makedumpfile.c:236:3:
makedumpfile.c:392:9: warning: 'fclose' called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc]
  392 |         fclose(pipe);
      |         ^~~~~~~~~~~~
makedumpfile.c: In function 'check_flattened_format':
makedumpfile.c:380:21: note: returned from 'popen'
  380 |         if ((pipe = popen(buf, "r")) == NULL)
      |                     ^~~~~~~~~~~~~~~

Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
2022-07-27 13:55:05 +09:00
Dave Anderson
8eb8fcc719 Fix for the "crash --osrelease" option for flattened format dumpfiles
in the unlikely event that the dumpfile header does not contain the
VMCOREINFO note section from the original ELF /proc/vmcore.  Without
the patch, the command displays nothing instead of showing "unknown".
(anderson@redhat.com)
2015-07-14 14:56:11 -04:00
Dave Anderson
7a2ff137fe Commit f95ecdc330 above to speed up
"crash --osrelease" for flattened format dumpfiles inadvertently
broke the option for ELF kdump and compressed kdump dumpfiles.
(anderson@redhat.com)
2015-07-01 16:25:56 -04:00
Dave Anderson
fbf9a6fed1 Fix for the initialization-time sorting mechanism required for
"flattened format" dumpfiles if the dumpfile is truncated/incomplete.
Without the patch, the sorting function continues performing invalid
reads beyond the of the dumpfile, which may lead to an infinite loop
instead of a session-ending error message.  In addition, since the
sorting operation may take several minutes, a "please wait" message
with an incrementing percentage-complete counter will be displayed.
(anderson@redhat.com)
2015-06-18 15:33:50 -04:00
Dave Anderson
f95ecdc330 Speed up the "crash --osrelease" option when used with "flattened"
format dumpfiles.  Without the patch, the rearranged data array
initialization is performed before the vmcoreinfo data in the
header is read, which can take a significant amount of time with
large dumpfiles.  The patch simply looks for the appropriate
vmcoreinfo data string near the beginning of the dumpfile.
(anderson@redhat.com)
2015-06-16 16:40:19 -04:00
Dave Anderson
d304aab38b Speed up the session invocation time of "flattened" format dumpfiles
created by the makedumpfile(8) facility.  When sorting the blocks of
memory by their intended ELF or compressed kdump file offsets, the
patch replaces the bubble-sort method that is currently used with an
insertion sort method.
(dslutz@verizon.com)
2015-04-29 10:27:03 -04:00
Dave Anderson
03e3937ec7 Initial commit: crash-7.0.4 2014-01-28 16:46:11 -05:00