upstream patch (5.4.13) to fix dval to lval conversion https://bugs.php.net/64142

This commit is contained in:
Remi Collet 2013-02-11 09:19:33 +01:00
parent 4422fef66d
commit e4ac5956e1
2 changed files with 37 additions and 1 deletions

29
php-5.4.11-conv.patch Normal file
View File

@ -0,0 +1,29 @@
From e67a2b9e471a7bc0b774b9056bb38745b7187969 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Mon, 11 Feb 2013 09:10:51 +0100
Subject: [PATCH] Fixed bug #64142 (dval to lval different behavior on ppc64)
See discussion on internals
http://marc.info/?t=136042277700003&r=1&w=2
---
NEWS | 3 +++
Zend/zend_operators.h | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 02a96dd..047b92e 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -79,7 +79,8 @@ static zend_always_inline long zend_dval_to_lval(double d)
#else
static zend_always_inline long zend_dval_to_lval(double d)
{
- if (d > LONG_MAX) {
+ /* >= as (double)LONG_MAX is outside signed range */
+ if (d >= LONG_MAX) {
return (long)(unsigned long) d;
}
return (long) d;
--
1.7.11.5

View File

@ -58,7 +58,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: 5.4.12
Release: 0.3.RC1%{?dist}
Release: 0.4.RC1%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@ -88,6 +88,8 @@ Patch8: php-5.4.7-libdb.patch
Patch21: php-5.4.7-odbctimer.patch
# https://bugs.php.net/64128 buit-in web server is broken on ppc64
Patch22: php-5.4.11-select.patch
# https://bugs.php.net/64142 dval to lval issue on ppc64
Patch23: php-5.4.11-conv.patch
# Functional changes
Patch40: php-5.4.0-dlopen.patch
@ -663,6 +665,7 @@ support for using the enchant library to PHP.
%patch21 -p1 -b .odbctimer
%patch22 -p1 -b .select
%patch23 -p1 -b .conv
%patch40 -p1 -b .dlopen
%patch41 -p1 -b .easter
@ -1409,6 +1412,10 @@ fi
%changelog
* Mon Feb 11 2013 Remi Collet <rcollet@redhat.com> 5.4.12-0.4.RC1
- upstream patch (5.4.13) to fix dval to lval conversion
https://bugs.php.net/64142
* Mon Feb 4 2013 Remi Collet <rcollet@redhat.com> 5.4.12-0.3.RC1
- upstream patch (5.4.13) for 2 failed tests