View Issue Details

IDProjectCategoryView StatusLast Update
0001491XdebugUncategorizedpublic2021-04-14 16:08
Reporterltikku Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
OSWindowsOS Versionwindows 10 
Product Version2.5.5 
Summary0001491: unexpected reference count
Description

I have xampp version 3.2.2 insalled, PHP version 7.1.1,
xdebug extension https://xdebug.org/files/php_xdebug-2.5.5-7.1-vc14.dll

I have the PHP code
$a = "new string";
xdebug_debug_zval( 'a' );

That outputs
a:
(refcount=2, is_ref=0)string 'new string' (length=10)

that refcount should be refcount=1

this is unexpected behaviour

my setting in php.ini is
[XDebug]
zend_extension="D:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9000

TagsNo tags attached.
Operating System
PHP Version7.1.0-7.1.4

Activities

derick

2017-11-18 11:18

administrator   ~0004468

There is indeed something weird going on here, and it got likely introduced with https://github.com/xdebug/xdebug/commit/2ddad8ecf219bd7e92bcb6807ead39a84d5c5718

It is unlikely that I will be able to fix this before Xdebug 2.6 is released.

derick

2021-03-17 09:37

administrator   ~0005763

Is this issue still relevant to you? Please note that with opcache, and ZTS, and PHP 7 and 8, the refcount might not be what you expect due to a myriad of optimisations in PHP itself.

derick

2021-04-14 16:08

administrator   ~0005840

Closing this, as it is missing requested feedback.

Issue History

Date Modified Username Field Change
2017-11-15 17:20 ltikku New Issue
2017-11-18 11:18 derick Note Added: 0004468
2017-11-18 11:18 derick Assigned To => derick
2017-11-18 11:18 derick Status new => acknowledged
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized
2021-03-17 09:37 derick Status acknowledged => feedback
2021-03-17 09:37 derick Note Added: 0005763
2021-04-14 16:08 derick Status feedback => closed
2021-04-14 16:08 derick Resolution open => no change required
2021-04-14 16:08 derick Note Added: 0005840