Menu

#81 Segfaults for invalid arguments like "-name=value" instead of "-name value"

dev
closed
nobody
None
5
2022-02-22
2015-07-10
No
x2x +sf data.raw  | frame -l 512 -p=80 > /dev/null

This will give a segmentation fault:

zsh: broken pipe                       x2x +sf data.raw | 
zsh: segmentation fault (core dumped)  frame -l 512 -p=80 > /dev/null

though I know the following works as expected:

x2x +sf data.raw  | frame -l 512 -p 80 > /dev/null

I think the CLI programs should show an error message instead of segfaults when users specify invalid argument(s).

FYI:

SPTK: version 3.8
CVS Info: $Id: frame.c,v 1.27 2014/12/11 08:30:35 uratec Exp $

Discussion

  • Keiichiro Oura

    Keiichiro Oura - 2015-07-13

    Thank you for using SPTK and kindly reporting the bugs.
    We will check them.

     
  • Takenori Yoshimura

    Thank you for your kindly reporting. The segmentation error was caused by the poor command line option parsing. It is not easy to quickly solve the problem because all the SPTK commands include the same problem and the command line option parsing should be quite improved to prevent the kind of error.
    We will fix it on the next major update.

     
  • Ryuichi Yamamoto

    I understand it requires quite a few efforts to fix. I hope you or someone else could work on this, or maybe I can help.

     
  • Takenori Yoshimura

    SPTK4 solved the problem.

     
  • Takenori Yoshimura

    • status: open --> closed
     

Log in to post a comment.