Age | Commit message (Collapse) | Author |
|
|
|
|
|
The php7 api has substantial changes in the way one goes about
interacting with the zval type (php's internal structure for dealing
with dynamically typed variables).
Most notably, most everything is dereferenced by one pointer. So,
where you once used zval** you typically use zval*, and where you
used zval* you now just use a zval struct on the stack.
In addition, the api changed in how you return a string. Previously
you had the option of whether or not to "duplicate" the memory returned
(or in other words, pass ownership of the pointer to PHP or not).
Because phpredis sometimes buffers commands to the server (say in the
case of a pipeline, or a MULTI/EXEC) transaction, we had several stack
violations and/or memory corruption which resulted from keeping track
of the address of a stack allocated structure, which was accessed at
a later date (sometimes causing segmentation faults, bus errors, etc).
Also, there were a few places where this pattern was being used:
zval **ptr = emalloc(sizeof(zval*) * count);
/* stuff */
ZVAL_STRING(ptr[0], "hello world");
Given that ZVAL_STRING() thinks it's writing to an allocated structure
it would cause various random issues (because we were blowing through
the data segment and writing into the code section).
This commit (so far) fixes all of the segmentation faults and memory
errors but there are still leaks (specifically in RedisArray) that need
to be solved.
Addresses #727
|
|
|
|
Addresses #707
|
|
|
|
|
|
|
|
|
|
|
|
* When converting zval from heap -> stack allocation some frees were left, causing invalid frees on stack values
* zend_parse* was use int instead of size_t when consuming strings, causing undefined behavior
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Addresses #520
|
|
Conflicts:
redis.c
|
|
|
|
|
|
Conflicts:
CREDITS
README.markdown
config.w32
library.c
library.h
package.xml
redis.c
redis_array.c
redis_array.h
redis_array_impl.c
redis_array_impl.h
tests/TestRedis.php
|
|
|
|
SAVE and BGSAVE need to be passed through multihost_distribute
Refs #472
|
|
|
|
Now we should be up to master with upstream for an easier merge.
|
|
Conflicts:
redis_array.c
|
|
This commit fixes auto rehashing in RedisArray as well as fixes
a couple of memory leaks found along the way
Addresses #442 and #294
|
|
Conflicts:
redis_array.c
redis_array_impl.c
redis_array_impl.h
|
|
The MGET call in RedisArray was failing under circumstances where
none of the passed keys hashed into any given node in the ring.
What was happening is that RedisArray was passing through to the
phpredis MGET command an empty array, which was returning false.
This in turn caused RedisArray to abort the process and return
false as well.
This change updates RedisArray MGET such that if a given node
doesn't have any keys, we skip the call to it all together.
Addresses #435
Addresses #436
|
|
Include win32/php_stdint.h on Win32 (fixes compilation on VC9)
Change C++ comments to C89 style (to adhere to PHP project)
|
|
This brings the W32 compilation fixes done by @char101 up to date and
allows building of php_redis.dll with VC11 on Win32 (allows for a php5.5
version).
|
|
|
|
|
|
Conflicts:
redis_array.c
redis_array_impl.c
redis_array_impl.h
|
|
|
|
Re-integrating the now old ra-performance branch into a git-flow
branch. I could have merged it but this was easier with so few
changes
|
|
Add a check in mget to make sure that the forwarded call is
returning with an array, and not NULL or something else.
Addresses issue #350
|
|
|
|
for other types, as phpredis proper takes a key->value array and
PHP doesn't support other array key types.
Addresses #360
|
|
GitHub issue #334
|
|
GitHub issue #334
|
|
in the header files
|
|
Added an option to let each RedisArray connection connect lazily to
their respective server. This is useful then working with a redis
cluster composed of many shards which are not necessarily in use all at
once.
|
|
New select DB command to RedisArray - Added retry delay on reconnect
Added the possibility to delay each reconnection attempt, including a
random factor to prevent several or many concurrent connections from
trying to reconnect at the same time.
Added the select command to RedisArray to select a DB on every
connections in one instruction.
Also, fixed a compiler warning:
redis_array_impl.c:1115:15: warning: incompatible pointer types
assigning to 'zval **' (aka 'struct _zval_struct **') from 'zval
**(*)[2]' [-Wincompatible-pointer-types]
Conflicts:
common.h
|
|
Added the possibility to delay each reconnection attempt, including a
random factor to prevent several or many concurrent connections from
trying to reconnect at the same time.
Added the select command to RedisArray to select a DB on every
connections in one instruction.
Also, fixed a compiler warning:
redis_array_impl.c:1115:15: warning: incompatible pointer types
assigning to 'zval **' (aka 'struct _zval_struct **') from 'zval
**(*)[2]' [-Wincompatible-pointer-types]
|
|
This reverts commit 3fb643211e524112bd9a19792f833b12b68de600.
|
|
Added the possibility to delay each reconnection attempt, including a
random factor to prevent several or many concurrent connections from
trying to reconnect at the same time.
Added the select command to RedisArray to select a DB on every
connections in one instruction.
|
|
* Addresses GitHub issue #262
* Tested successfully with code provided by bug reporter
* array-tests.php passes
|
|
* Add "f" parameter in _rehash()
* Call object with new method
* Add rehash test with closure
|