mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-4807: Fix php segfault on reference pass
Client: php (extension) When reference is passed to php extension, it's unreferenced (instead of derefrenced). The next time one tries to use the same variable PHP segaults. Even if not used again, php segfaults on user_shutdown_function_call.
This commit is contained in:
parent
c6b019affd
commit
a4ee1f281b
@ -1013,7 +1013,7 @@ void binary_serialize_spec(zval* zthis, PHPOutputTransport& transport, HashTable
|
||||
zval* prop = zend_read_property(Z_OBJCE_P(zthis), zthis, varname, strlen(varname), false, &rv);
|
||||
|
||||
if (Z_TYPE_P(prop) == IS_REFERENCE){
|
||||
ZVAL_UNREF(prop);
|
||||
ZVAL_DEREF(prop);
|
||||
}
|
||||
if (Z_TYPE_P(prop) != IS_NULL) {
|
||||
transport.writeI8(ttype);
|
||||
|
Loading…
Reference in New Issue
Block a user