MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001501XdebugUsage problems (Wrong Results)public2017-12-08 23:142017-12-28 19:16
ReporterCharlotteDunois 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformPHP 7.1.11 x86, PHP 7.2.0 x64OSOS Version
Product Version2.5.5 
Target Version2.6.0Fixed in Version2.6.0beta1 
Summary0001501: Xdebug var dump tries casting properties
DescriptionThe xdebug version of var_dump tries to cast numeric strings in class properties to integer, thus leading to wrong results. In my case those numeric strings were 64bit integers (as string, because integer overflow on 32bit systems), which ended up horribly wrong. So instead of $373556941768884244 I had ${830734356} in my dump.

This behaviour seems to have started in 2.5.0 and only affects PHP 7.1 and newer. Tests have shown that PHP 7.0 is unaffected.
TagsNo tags attached.
Operating System
PHP Version7.1.10-7.1.14
Attached Filespng file icon iivfD9lzHkcmBuG6cuoQcks2BAYgz0GVX3.png [^] (16,000 bytes) 2017-12-08 23:14

- Relationships

-  Notes
(0004505)
derick (administrator)
2017-12-09 12:42

Would you please have a code snippet for me that demonstrates this?
(0004506)
CharlotteDunois (reporter)
2017-12-09 23:31
edited on: 2017-12-09 23:33

I just tried making a verifiable example and found out, that using __debugInfo will give you the weird output.

https://3v4l.org/uiPv8 [^]

Output with debugInfo:
class h#205 (1) {
  public ${830734356} =>
  string(5) "hallo"
}

Output without debugInfo:
class h#205 (1) {
  public $data =>
  array(1) {
    [373556941768884244] =>
    string(5) "hallo"
  }
}

(0004509)
derick (administrator)
2017-12-12 13:07

Thanks for your report, this should be fixed for Xdebug 2.6.0.
(0004510)
derick (administrator)
2017-12-12 13:07

That said, you might want to test the 2.6.0beta1 binaries when they become available.

- Issue History
Date Modified Username Field Change
2017-12-08 23:14 CharlotteDunois New Issue
2017-12-08 23:14 CharlotteDunois File Added: iivfD9lzHkcmBuG6cuoQcks2BAYgz0GVX3.png
2017-12-09 12:42 derick Note Added: 0004505
2017-12-09 12:42 derick Assigned To => derick
2017-12-09 12:42 derick Status new => feedback
2017-12-09 23:31 CharlotteDunois Note Added: 0004506
2017-12-09 23:31 CharlotteDunois Status feedback => assigned
2017-12-09 23:32 CharlotteDunois Note Edited: 0004506 View Revisions
2017-12-09 23:33 CharlotteDunois Note Edited: 0004506 View Revisions
2017-12-10 15:17 derick Status assigned => confirmed
2017-12-10 15:17 derick Target Version => 2.6.0
2017-12-10 15:17 derick Description Updated View Revisions
2017-12-12 13:07 derick Note Added: 0004509
2017-12-12 13:07 derick Status confirmed => closed
2017-12-12 13:07 derick Resolution open => fixed
2017-12-12 13:07 derick Fixed in Version => 2.6.0
2017-12-12 13:07 derick Note Added: 0004510
2017-12-28 19:16 derick Fixed in Version 2.6.0 => 2.6.0beta1


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker