Welcome! Log In Create A New Profile

Advanced

Potential bug in ngx_event.c

Rian Hunter
August 23, 2019 02:02PM
Hello,

While browsing the source I noticed something that seemed wrong, even
though I haven't observed any buggy behavior or have reproduced this bug
myself. In ngx_event.c there is a line:

if (ngx_shmtx_create(&ngx_accept_mutex, (ngx_shmtx_sh_t *) shared,
cycle->lock_file.data)
!= NGX_OK)
{
return NGX_ERROR;
}

ngx_shmtx_create() is passed &ngx_accept_mutex, but this must be a
pointer to a shared memory region otherwise the sem_wait()/sem_post()
calls in ngx_shmtx.c will not function correctly. &ngx_accept_mutex is a
pointer to BSS, ngx_accept_mutex_ptr is a pointer to shared memory. Is
this intentional?

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

Potential bug in ngx_event.c

Rian Hunter 86 August 23, 2019 02:02PM

Re: Potential bug in ngx_event.c

Maxim Dounin 15 August 30, 2019 10:20AM

Re: Potential bug in ngx_event.c

Rian Hunter 16 August 30, 2019 09:28PM

Re: Potential bug in ngx_event.c

Maxim Dounin 16 August 31, 2019 02:30PM

Re: Potential bug in ngx_event.c

Rian Hunter 18 September 01, 2019 02:46PM

Re: Potential bug in ngx_event.c

Maxim Dounin 15 September 02, 2019 12:24PM

Re: Potential bug in ngx_event.c

Rian Hunter 19 September 02, 2019 12:50PM



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

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready