Open
Description
Description
The following code:
<?php
$v = new variant("123");
$v2 = clone $v;
Resulted in this output:
Assertion failed: (!(((uintptr_t)((executor_globals.objects_store).object_buckets[handle])) & (1<<0))), file Zend\zend_objects_API.c, line 189
But I expected no output instead.
php-src/ext/com_dotnet/php_com_dotnet_internal.h
Lines 28 to 49 in b14469b
php-src/ext/com_dotnet/com_handlers.c
Lines 594 to 616 in b14469b
That memcpy()
is a "bit" crude, and while we cater to v
and typeinfo
, we apparently missed sink_dispatch
and possibly the elements of method_cache
. modified
seems to need an reset (not sure, though).
(I also wonder why we store the ce
.)
Anyhow, I wonder if that's worth fixing, or whether we should just forbid cloning in the first place; we can still implement proper cloning if requested.
PHP Version
master (but likely since PHP 7, or even before)
Operating System
Windows