makedumpfile's segmentation fault with option -V

Ken'ichi Ohmichi oomichi at mxs.nes.nec.co.jp
Mon Feb 21 23:56:01 EST 2011


Hi,

On Tue, 22 Feb 2011 12:34:58 +0900 (   )
HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com> wrote:
> 
> On fc14 and el6 on x86_64, makedumpfile has resulted in segmentation
> fault with option -V.
> 
>   $ makedumpfile -V
>   Segmentation fault (core dumped)
> 
> I've found this by mistaking -v for -V to display version information.

Thank you for the report.
That is a bug, and it will be fixed.

-V option is not public, and it is used internally for --vtop option.
A bug is that the second argument in getopt_long() includes 'V'.
This patch fixes it.


Thanks
Ken'ichi Ohmichi

diff --git a/makedumpfile.c b/makedumpfile.c
index 80f6b70..8847668 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -7844,7 +7844,7 @@ main(int argc, char *argv[])

        info->block_order = DEFAULT_ORDER;
        message_level = DEFAULT_MSG_LEVEL;
-       while ((opt = getopt_long(argc, argv, "b:cDd:EFfg:hi:MRrsVvXx:", longopts,
+       while ((opt = getopt_long(argc, argv, "b:cDd:EFfg:hi:MRrsvXx:", longopts,
            NULL)) != -1) {
                switch (opt) {
                case 'b':
---



More information about the kexec mailing list