summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2018-02-09 08:13:01 -0800
committerMark Spruiell <mes@zeroc.com>2018-02-09 08:13:01 -0800
commit8eb40bb05238ebcb5d053f71b609daa923f20981 (patch)
tree595ca14ccf1f0e14a767cb0f56543a96a68207d3 /php/src
parentFixed another Util.py getCommandLine issue (diff)
downloadice-8eb40bb05238ebcb5d053f71b609daa923f20981.tar.bz2
ice-8eb40bb05238ebcb5d053f71b609daa923f20981.tar.xz
ice-8eb40bb05238ebcb5d053f71b609daa923f20981.zip
ICE-8636 - assertion failure with PHP7 debug build
Diffstat (limited to 'php/src')
-rw-r--r--php/src/php7/Types.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/php/src/php7/Types.cpp b/php/src/php7/Types.cpp
index 8ddf6a87461..00904a425a9 100644
--- a/php/src/php7/Types.cpp
+++ b/php/src/php7/Types.cpp
@@ -307,6 +307,9 @@ IcePHP::StreamUtil::setSlicedDataMember(zval* obj, const Ice::SlicedDataPtr& sli
zval slices;
array_init(&slices);
+#ifdef HT_ALLOW_COW_VIOLATION
+ HT_ALLOW_COW_VIOLATION(Z_ARRVAL(slices)); // Allow circular references.
+#endif
AutoDestroy slicesDestroyer(&slices);
if(add_property_zval(&sd, STRCAST("slices"), &slices) != SUCCESS)
@@ -372,6 +375,9 @@ IcePHP::StreamUtil::setSlicedDataMember(zval* obj, const Ice::SlicedDataPtr& sli
//
zval instances;
array_init(&instances);
+#ifdef HT_ALLOW_COW_VIOLATION
+ HT_ALLOW_COW_VIOLATION(Z_ARRVAL(instances)); // Allow circular references.
+#endif
AutoDestroy instancesDestroyer(&instances);
if(add_property_zval(&slice, STRCAST("instances"), &instances) != SUCCESS)
{
@@ -1594,6 +1600,9 @@ IcePHP::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr
zval zv;
array_init(&zv);
+#ifdef HT_ALLOW_COW_VIOLATION
+ HT_ALLOW_COW_VIOLATION(Z_ARRVAL(zv)); // Allow circular references.
+#endif
AutoDestroy destroy(&zv);
Ice::Int sz = is->readSize();
@@ -1670,7 +1679,6 @@ IcePHP::SequenceInfo::unmarshaled(zval* zv, zval* target, void* closure)
{
Z_ADDREF_P(zv);
}
-
}
void
@@ -2235,6 +2243,9 @@ IcePHP::DictionaryInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackP
zval zv;
array_init(&zv);
+#ifdef HT_ALLOW_COW_VIOLATION
+ HT_ALLOW_COW_VIOLATION(Z_ARRVAL(zv)); // Allow circular references.
+#endif
AutoDestroy destroy(&zv);
Ice::Int sz = is->readSize();