proposed solution for ticket 686 (With some condition, ngx_palloc() function will alloc a illegal memory address)
mdounin at mdounin.ru
Thu Dec 10 17:36:26 UTC 2020
On Thu, Dec 10, 2020 at 04:17:01PM +0000, Chris Newton wrote:
> Ticket 686 is marked as 'wontfix' as the constraints on the size of the
> memory pool are documented.
> I'd like to suggest that the constraints are enforced by the code to
> prevent issues. eg.,
Thanks for your suggestion. This was considered previously, and
the answer is no, as such enforcement introduces generally
unneeded run-time code. Futher, in your particular variant it
masks bugs in the calling code instead of encouraging the authors
to fix them.
Instead, consider introducing appropriate checking during
configuration parsing if you provide your own pools with
configurable sizes (and provide appropriate compiled-in sizes if
there are any).
More information about the nginx-devel