[php-src] PR #14793: Do not create a memory mapping too close to the heap

From: Date: Wed, 03 Jul 2024 17:11:29 +0000
Subject: [php-src] PR #14793: Do not create a memory mapping too close to the heap
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-26996@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/14793 Author: arnaud-lb This is a potential fix for https://github.com/php/php-src/issues/11266: Under some conditions we may allocate the opcache shm segment just after the heap, which prevents it from expanding. As a result, malloc appears to fallback to mmap(). Heap segments created with mmap() do not have the [heap] label. I presume that this may confuse some unidentified code, causing the memory leak observed in https://github.com/php/php-src/issues/11266. Here I change find_prefered_mmap_base() so that it doesn't return an address too close to the heap. I also backport a2af8ac3710510e7f563f9b6455299dcc7a5459c from 8.3, otherwise no good candidate is found.

« previous php.git-pulls (#26996) next »