php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31527 msg_send wrong serialize on Integer
Submitted: 2005-01-13 06:55 UTC Modified: 2005-02-07 23:32 UTC
From: zxd at zhangxiaodong dot net Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.0.3 OS: RedHat Linux AS3 2.4.21-20 i686
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zxd at zhangxiaodong dot net
New email:
PHP Version: OS:

 

 [2005-01-13 06:55 UTC] zxd at zhangxiaodong dot net
Description:
------------
The type and value of a Integer varible passed to function msg_send which do not use serialize will be changed after 1 second sleep.


Reproduce code:
---------------
function t18(){
	$a = 1234;
	$qid = msg_get_queue($a);
	
	// cause core dump
	msg_send($qid, 1, $a, false);
	sleep(1);
	echo "type of a=".gettype($a)."\n";
	echo "value of a= {$a}\n";
}


Expected result:
----------------
type of a=integer
value of a=1234



Actual result:
--------------
type of a=integer
value of a= 0
segment falut(core dumped)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-13 07:04 UTC] zxd at zhangxiaodong dot net
use a string instead of Integer can get right result.
eg.
msg_send($qid, 1, $a);
------
msg_send($qid, 1, "$a", false);
------
settype($a,"string");
msg_send($qid, 1, $a, false);
------
$a = "1234"
msg_send($qid, 1, $a, false);
 [2005-02-07 23:32 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC