#38376 [Opn->Bgs]: unserialize between 64bit and 32bit systems

From: Date: Tue, 08 Aug 2006 12:05:33 +0000
Subject: #38376 [Opn->Bgs]: unserialize between 64bit and 32bit systems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100514@lists.php.net to get a copy of this message
ID: 38376 Updated by: tony2001@php.net Reported By: are at fronter dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 4.4.3 New Comment: Using numbers >= 2147483648 is expected to cause integer overflow on 32bit platforms. Previous Comments: ------------------------------------------------------------------------ [2006-08-08 09:05:42] are at fronter dot com Description: ------------ We run 10 webserver behind a loadbalancer. Some of these are 32bit and some are 64bit. When serializing an array containing the value 2147483648 on a 64bit machine it is stored as an integer. The serialized string is stored in a database. When unserializing on a 32bit machine this number becomes -2147483648. Something that surely breaks a lot of things. We are now casting the number to float to get around this, but I would think that unserialize should convert the number to float if it can't fit into an int on the running architecture. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38376&edit=1

« previous php.bugs (#100514) next »