Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5844b3a
[RFC] ext-user_cache: initial implementation
zeriyoshi Jul 13, 2026
ac85666
fix: include pthread.h
zeriyoshi Jul 14, 2026
d736920
fix: void ptr cast
zeriyoshi Jul 14, 2026
83af4e3
fix: skip 32-bit over shm size test
zeriyoshi Jul 14, 2026
5231adb
fix: repeat test failure
zeriyoshi Jul 14, 2026
66016ee
fix: add CONFLICTS for Windows
zeriyoshi Jul 14, 2026
24db5dd
chore: coding style
zeriyoshi Jul 15, 2026
6ae11c6
chore: coding style 2
zeriyoshi Jul 15, 2026
b95a17c
test: add CONFLICTS all into user_cache fpm tests
zeriyoshi Jul 15, 2026
17bd012
fix: minimize upstream changes and add support DatePeriod and DateInt…
zeriyoshi Jul 15, 2026
9563389
fix: UAF on DatePeriod safe-direct path
zeriyoshi Jul 15, 2026
104964b
fix: cant drop entry if __unserialize throwed Exception
zeriyoshi Jul 15, 2026
46e329e
refactor: comment and remove dropped internal functions
zeriyoshi Jul 18, 2026
7cf0ca7
refactor: api and more secure memory management
zeriyoshi Jul 18, 2026
d2dde94
refactor: API and structure changes
zeriyoshi Jul 19, 2026
c66b48d
fix: Windows build
zeriyoshi Jul 19, 2026
265eeda
chore: fix author section
zeriyoshi Jul 19, 2026
0c0730e
fix: OPcache User Cache -> UserCache
zeriyoshi Jul 19, 2026
0aa2a06
fix: fix repeat tests
zeriyoshi Jul 19, 2026
dc3ac12
fix: strict memory checking
zeriyoshi Jul 22, 2026
3862597
feat: add support DatePeriod and DateInterval
zeriyoshi Jul 23, 2026
2f53a88
fix: index memory usage and LRU based memory eviction
zeriyoshi Jul 26, 2026
3be51ee
fix: memory management and memory structures
zeriyoshi Jul 26, 2026
9b59965
fix: fix LRU impl and more
zeriyoshi Jul 27, 2026
fdf2716
fix: fix SEGV on many patterns
zeriyoshi Jul 31, 2026
e32adf6
fix: cache boundary
zeriyoshi Aug 12, 2026
3c1118f
fix: dtest: deprecated spl_object_hash
zeriyoshi Aug 12, 2026
be695ff
fix: test: repeat test needs reset
zeriyoshi Aug 12, 2026
94ac96d
fix: adopt upstream changes
zeriyoshi Aug 17, 2026
ca466a0
feat: more strict shm handling
zeriyoshi Aug 28, 2026
bf95f4c
refactor: unify fetchMultiple teardown across success and failure paths
zeriyoshi Sep 11, 2026
43e2c77
refactor and more consistency
zeriyoshi Sep 13, 2026
40a9792
back boundary partitions with preallocated mmap file
zeriyoshi Sep 16, 2026
5d707ad
fix tests on 32bit environments
zeriyoshi Sep 16, 2026
fbcd3d4
expand to 16GiB shm, LRU fixes, refactoring
zeriyoshi Sep 18, 2026
2f581c0
fix posix allocator
zeriyoshi Sep 18, 2026
df5db94
fix platform depended tests
zeriyoshi Sep 18, 2026
ca7f601
fix test failure by memory allocation timing on Windows
zeriyoshi Sep 18, 2026
68f5210
fix tests on --repeat > 1
zeriyoshi Sep 18, 2026
f5ed584
fix zend_string memory alignment /8 on php_ucache_block_t
zeriyoshi Sep 18, 2026
fa61ff3
fix test for pre init pool stats
zeriyoshi Sep 18, 2026
1aa6df3
revert unintended changes on opcache
zeriyoshi Sep 18, 2026
3bfe8fc
optimize multiple fetch on same request
zeriyoshi Sep 18, 2026
61a71d7
re-implementation and refactoring
zeriyoshi Sep 29, 2026
25dfc3f
fix platform depended test and implementations
zeriyoshi Sep 29, 2026
6571a4a
stdc11
zeriyoshi Sep 29, 2026
85e94a2
fix test on array_map changes (maybe regression?)
zeriyoshi Sep 30, 2026
a15abd6
exec -> proc_open
zeriyoshi Sep 30, 2026
dc5ac8e
enhance memory safety
zeriyoshi Oct 7, 2026
c15e027
fix platform differences
zeriyoshi Oct 7, 2026
1c08483
fix repeat test
zeriyoshi Oct 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
884 changes: 884 additions & 0 deletions ext/date/php_date.c

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions ext/pcntl/pcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "ext/standard/info.h"
#include "ext/standard/php_filestat.h"
#include "php_signal.h"
#include "ext/user_cache/php_user_cache.h"
#include "php_ticks.h"
#include "zend_exceptions.h"
#include "zend_fibers.h"
Expand Down Expand Up @@ -271,8 +272,12 @@ PHP_FUNCTION(pcntl_fork)

ZEND_PARSE_PARAMETERS_NONE();

php_ucache_fork_prepare();

id = fork();
if (id == -1) {
php_ucache_fork_cancel();

PCNTL_G(last_error) = errno;
switch (errno) {
case EAGAIN:
Expand Down Expand Up @@ -1586,9 +1591,13 @@ PHP_FUNCTION(pcntl_rfork)
}
#endif

php_ucache_fork_prepare();

pid = rfork(flags);

if (pid == -1) {
php_ucache_fork_cancel();

PCNTL_G(last_error) = errno;
switch (errno) {
case EAGAIN:
Expand Down Expand Up @@ -1626,9 +1635,13 @@ PHP_FUNCTION(pcntl_forkx)
RETURN_THROWS();
}

php_ucache_fork_prepare();

pid = forkx(flags);

if (pid == -1) {
php_ucache_fork_cancel();

PCNTL_G(last_error) = errno;
switch (errno) {
case EAGAIN:
Expand Down
18 changes: 4 additions & 14 deletions ext/random/engine_xoshiro256starstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@

#include "Zend/zend_exceptions.h"

static inline uint64_t splitmix64(uint64_t *seed)
{
uint64_t r;

r = (*seed += 0x9e3779b97f4a7c15ULL);
r = (r ^ (r >> 30)) * 0xbf58476d1ce4e5b9ULL;
r = (r ^ (r >> 27)) * 0x94d049bb133111ebULL;
return (r ^ (r >> 31));
}

ZEND_ATTRIBUTE_CONST static inline uint64_t rotl(const uint64_t x, int k)
{
return (x << k) | (x >> (64 - k));
Expand Down Expand Up @@ -92,10 +82,10 @@ PHPAPI inline void php_random_xoshiro256starstar_seed64(php_random_status_state_
{
uint64_t s[4];

s[0] = splitmix64(&seed);
s[1] = splitmix64(&seed);
s[2] = splitmix64(&seed);
s[3] = splitmix64(&seed);
s[0] = php_random_splitmix64(&seed);
s[1] = php_random_splitmix64(&seed);
s[2] = php_random_splitmix64(&seed);
s[3] = php_random_splitmix64(&seed);

php_random_xoshiro256starstar_seed256(state, s[0], s[1], s[2], s[3]);
}
Expand Down
13 changes: 13 additions & 0 deletions ext/random/php_random.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,19 @@ static inline zend_long GENERATE_SEED(void)
return (zend_long)php_random_generate_fallback_seed();
}

static zend_always_inline uint64_t php_random_splitmix64_mix(uint64_t z)
{
z = (z ^ (z >> 30)) * UINT64_C(0xbf58476d1ce4e5b9);
z = (z ^ (z >> 27)) * UINT64_C(0x94d049bb133111eb);

return z ^ (z >> 31);
}

static zend_always_inline uint64_t php_random_splitmix64(uint64_t *seed)
{
return php_random_splitmix64_mix(*seed += UINT64_C(0x9e3779b97f4a7c15));
}

PHPAPI void *php_random_status_alloc(const php_random_algo *algo, const bool persistent);
PHPAPI void *php_random_status_copy(const php_random_algo *algo, void *old_status, void *new_status);
PHPAPI void php_random_status_free(void *status, const bool persistent);
Expand Down
Loading
Loading