Welcome! Log In Create A New Profile

Advanced

Re: [nginx] map module cause core dump

Maxim Dounin
May 19, 2016 07:28AM
Hello!

On Thu, May 19, 2016 at 01:03:14PM +0800, 洪志道 wrote:

> Hi,
>
> It seems the following configure will cause core dump file.
>
> map $uri $s {
> default $s; # same var name as the var generated by map directive
> above
> }
>
> server {
> listen 80;
>
> location / {
> return 200 $s;
> }
> }

This is a classical example of infinite recursion. It's expected
to work fine on any host with infinite amount of memory, but
you've probably tried it on a host with some limited amount of
memory available. Avoid writing such configurations on hosts with
limited amount of memory.

Jokes aside, the result is expected. We've considered adding a
protection from such types of recursion (much like what we do with
subrequests and internal redirections), but yet think it would be
an overkill.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] map module cause core dump

洪志道 380 May 19, 2016 01:04AM

Re: [nginx] map module cause core dump

Maxim Dounin 164 May 19, 2016 07:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 217
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready