njs isuse -- ext->set is null

洪志道 hongzhidao at gmail.com
Sun Jan 3 05:18:11 UTC 2016


yep, happy new year.

i found anthoer bug.

js_run "
            function foo()
            {
                return 'bug while there is empty statement such ; after
return statement';
            }
        ";

i think in the source:
njs/njs_parser.c/njs_parser_function_lambda: 520

/*
     * There is no function body or the last function body statement is not
     * "return" statement.  If function has body then the body->right node
is
     * always present and it is a NJS_TOKEN_STATEMENT link node.
     */
    body = parser->node;

if function has body but the last statement is empty such simicolon, the
body->right node is also null.


2016-01-03 1:34 GMT+08:00 Igor Sysoev <igor at sysoev.ru>:

> On 02 Jan 2016, at 17:17, 洪志道 <hongzhidao at gmail.com> wrote:
>
> js_set $bar "
>   $r.error = "this will cause coredump file since ext->set is null";
> “;
>
>
> Thank you, I will this after new year vacation.
>
>
> --
> Igor Sysoev
> http://nginx.com
>
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160103/19687421/attachment.html>


More information about the nginx-devel mailing list