MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001282XdebugUsage problems (Wrong Results)public2016-03-04 13:162016-03-15 11:40
ReporterProfic 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.4.0 
Target VersionFixed in Version2.4.1 
Summary0001282: var_dump() of integers > 32 bit is broken
DescriptionThis is 64 bit Windows, PHP and Xdebug. It seems any integer with more than 32 bit value are truncated to 32 bits in Xdebug's var_dump(). Examlpe uses PHP_INT_MAX but any value outside of 32 bit integer range is affected.
Steps To ReproduceD:\devel\rgu-bars-forms>php -r "var_dump(PHP_INT_SIZE, PHP_INT_MAX);"
Command line code:1:
int(8)
Command line code:1:
int(-1)

D:\devel\rgu-bars-forms>php -d xdebug.overload_var_dump=0 -r "var_dump(PHP_INT_SIZE, PHP_INT_MAX);"
int(8)
int(9223372036854775807)
Additional InformationD:\devel\rgu-bars-forms>php -v
PHP 7.0.4 (cli) (built: Mar 2 2016 14:42:25) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
TagsNo tags attached.
Operating SystemWindows 7 x64
PHP Version7.0.0-7.0.4
Attached Files

- Relationships
has duplicate 0001332resolvedderick Int overflow 
has duplicate 0001293resolvedderick Great integer values ( bigger then 2 ^35 ) are wrong in the debug output, but right in the final php-output 

-  Notes
(0003547)
derick (administrator)
2016-03-04 15:46

I can't easily see what the problem is by looking at the code, so I'm going to have to get back to this once I make it home and have access to Windows again. On Linux, this works "just fine"™.
(0003551)
Profic (reporter)
2016-03-04 15:59

I may be wrong, but after quick search line 1031 in xdebug_var.c may be the cause (https://github.com/xdebug/xdebug/blob/master/xdebug_var.c#L1031 [^]): on Windows to print long long "%lld" is required.
(0003553)
derick (administrator)
2016-03-04 16:01

Sure, but I'd like to test it before committing something like that. And Windows uses some other format specifiers too in places. I'll get to it :-)
(0003570)
derick (administrator)
2016-03-15 11:40

Fixed in GitHub for 2.4.1. Thanks for your report!

- Issue History
Date Modified Username Field Change
2016-03-04 13:16 Profic New Issue
2016-03-04 15:46 derick Note Added: 0003547
2016-03-04 15:59 Profic Note Added: 0003551
2016-03-04 16:01 derick Note Added: 0003553
2016-03-15 11:40 derick Note Added: 0003570
2016-03-15 11:40 derick Status new => closed
2016-03-15 11:40 derick Assigned To => derick
2016-03-15 11:40 derick Resolution open => fixed
2016-03-15 11:40 derick Fixed in Version => 2.4.1
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-08-01 21:26 derick Relationship added has duplicate 0001332
2016-08-01 21:27 derick Relationship added has duplicate 0001293


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker