Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix --abort_on_uncaught_exception arg parsing #13004

Merged

Commits on May 16, 2017

  1. src: fix --abort_on_uncaught_exception arg parsing

    Fix c0bde73, which inadvertently introduced a use of strcmp() without
    correctly comparing its return to zero. Caught by coverity:
    
            >>>     CID 169223:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
            >>>     The "or" condition "strcmp(arg, "--abort-on-uncaught-exception") || strcmp(arg, "--abort_on_uncaught_exception")" will always be true because "arg" cannot be equal to two different values at the same time, so it must be not equal to at least one of them.
            3909         } else if (strcmp(arg, "--abort-on-uncaught-exception") ||
            3910                    strcmp(arg, "--abort_on_uncaught_exception")) {
            3911           abort_on_uncaught_exception = true;
            3912           // Also a V8 option.  Pass through as-is.
            3913           new_v8_argv[new_v8_argc] = arg;
            3914           new_v8_argc += 1;
    
    PR-URL: nodejs#13004
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    sam-github committed May 16, 2017
    Configuration menu
    Copy the full SHA
    53dae83 View commit details
    Browse the repository at this point in the history