Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99694 invoked from network); 22 Jan 2018 14:41:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2018 14:41:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=samding@ca.ibm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=samding@ca.ibm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ca.ibm.com designates 148.163.158.5 as permitted sender) X-PHP-List-Original-Sender: samding@ca.ibm.com X-Host-Fingerprint: 148.163.158.5 mx0b-001b2d01.pphosted.com Received: from [148.163.158.5] ([148.163.158.5:45334] helo=mx0a-001b2d01.pphosted.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/47-28995-008F56A5 for ; Mon, 22 Jan 2018 09:41:05 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0MEeG8S139754 for ; Mon, 22 Jan 2018 09:41:02 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.67]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fne74stya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 22 Jan 2018 09:41:00 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Mon, 22 Jan 2018 14:40:59 -0000 Received: from us1a3-smtp05.a3.dal06.isc4sb.com (10.146.71.159) by smtp.notes.na.collabserv.com (10.106.227.16) with smtp.notes.na.collabserv.com ESMTP; Mon, 22 Jan 2018 14:40:49 -0000 Received: from us1a3-mail101.a3.dal06.isc4sb.com ([10.146.21.220]) by us1a3-smtp05.a3.dal06.isc4sb.com with ESMTP id 2018012214404858-642279 ; Mon, 22 Jan 2018 14:40:48 +0000 MIME-Version: 1.0 In-Reply-To: To: Sara Golemon Cc: PHP internals , php@golemon.com Date: Mon, 22 Jan 2018 09:40:49 -0500 References: X-KeepSent: D3FCAE71:26BFD7B9-0025821D:005038E5; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP7 August 18, 2016 X-LLNOutbound: False X-Disclaimed: 39935 X-TNEFEvaluated: 1 Content-type: multipart/alternative; Boundary="0__=8FBB088EDFC3BE758f9e8a93df938690918c8FBB088EDFC3BE75" Content-Disposition: inline x-cbid: 18012214-0327-0000-0000-000003C5C0BF X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.417846; ST=0; TS=0; UL=0; ISC=; MB=0.196385 X-IBM-SpamModules-Versions: BY=3.00008409; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000247; SDB=6.00978752; UDB=6.00496018; IPR=6.00758050; BA=6.00005786; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019145; XFM=3.00000015; UTC=2018-01-22 14:40:58 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2018-01-22 10:02:51 - 6.00007944 x-cbparentid: 18012214-0328-0000-0000-00003CE1D97F Message-ID: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-22_06:,, signatures=0 X-Proofpoint-Spam-Reason: safe Subject: Re: [PHP-DEV] Big_Endian problem From: samding@ca.ibm.com ("Sam Ding") --0__=8FBB088EDFC3BE758f9e8a93df938690918c8FBB088EDFC3BE75 Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=US-ASCII Thank Sara. Yes, on s390x, it is broken. The function "ignore=5Fuser=5Fabort" returns "256" on s390x, and "1" on x86= =5F64 after "ignore=5Fuser=5Fabort" is set to true; Please let me know when you finished code changes on v7.2.1. I will test on s390x. Thanks, Sam php@golemon.com wrote on 01/19/2018 05:07:25 PM: > From: Sara Golemon > To: Sam Ding > Cc: PHP internals > Date: 01/19/2018 05:07 PM > Subject: Re: [PHP-DEV] Big=5FEndian problem > Sent by: php@golemon.com > > On Fri, Jan 19, 2018 at 4:04 PM, Sam Ding wrote: > > The test case ext/standard/tests/general=5Ffunctions/bug72300.phpt is failed > > on s390x. > > The function "ignore=5Fuser=5Fabort" returns "256" on s390x, and "1" on x86=5F64 > > after "ignore=5Fuser=5Fabort" is set to true; > > The root reason is because of Big=5FEndian on s390x. > > Here is the C code: ext/standard/basic=5Ffunctions.c > > b/ext/standard/basic=5Ffunctions.c:5641 > > > > old=5Fsetting =3D (unsigned short)PG(ignore=5Fuser=5Fabort); > > // php=5Fcore=5Fglobals.ignore=5Fuser=5Fabort, "x /2b" = shows its > > value : "0x01 0x00" on both platforms > > > That specific line isn't the problem, as it's just cashing a short to > an unsigned short, which is legal and not problematic for any > endianness. > > The actual problem is that PG(ignore=5Fuser=5Fabort) is declared as a > short, but its INI handler method is defined as OnUpdateBool (which of > course, only operates on a single byte). > > > Does PHP interpreter support Big=5FEndian? Are there any existing > > macros/functions to deal with Big/Little Endian? > > > Yep. And if things break on s390x, please let us know! > > I'll put together a fix for this over the weekend and apply it to 7.0 > and later versions. > > -Sara > --0__=8FBB088EDFC3BE758f9e8a93df938690918c8FBB088EDFC3BE75--