Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14362 invoked from network); 22 Jan 2018 18:35:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2018 18:35:03 -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.156.1 as permitted sender) X-PHP-List-Original-Sender: samding@ca.ibm.com X-Host-Fingerprint: 148.163.156.1 mx0a-001b2d01.pphosted.com Received: from [148.163.156.1] ([148.163.156.1:44392] helo=mx0a-001b2d01.pphosted.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/59-28995-C39266A5 for ; Mon, 22 Jan 2018 13:11:10 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0MI9cxA070564 for ; Mon, 22 Jan 2018 13:11:06 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.82]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fnn0602du-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 22 Jan 2018 13:11:05 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Mon, 22 Jan 2018 18:11:04 -0000 Received: from us1a3-smtp07.a3.dal06.isc4sb.com (10.146.103.14) by smtp.notes.na.collabserv.com (10.106.227.105) with smtp.notes.na.collabserv.com ESMTP; Mon, 22 Jan 2018 18:11:02 -0000 Received: from us1a3-mail101.a3.dal06.isc4sb.com ([10.146.21.220]) by us1a3-smtp07.a3.dal06.isc4sb.com with ESMTP id 2018012218110105-885103 ; Mon, 22 Jan 2018 18:11:01 +0000 MIME-Version: 1.0 To: "PHP internals" Date: Mon, 22 Jan 2018 13:11:01 -0500 X-KeepSent: 3CAC706D:D092F0CF-0025821D:0061146A; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP7 August 18, 2016 X-LLNOutbound: False X-Disclaimed: 51427 X-TNEFEvaluated: 1 Content-type: multipart/alternative; Boundary="0__=8FBB088EDFF292FA8f9e8a93df938690918c8FBB088EDFF292FA" Content-Disposition: inline x-cbid: 18012218-5101-0000-0000-000007F57DB5 X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.423878; ST=0; TS=0; UL=0; ISC=; MB=0.485420 X-IBM-SpamModules-Versions: BY=3.00008410; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000247; SDB=6.00978822; UDB=6.00496059; IPR=6.00758119; BA=6.00005788; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019151; XFM=3.00000015; UTC=2018-01-22 18:11:03 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2018-01-22 15:30:21 - 6.00007945 x-cbparentid: 18012218-5102-0000-0000-000023E0DA3A Message-ID: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-22_07:,, signatures=0 X-Proofpoint-Spam-Reason: safe Subject: v7.2.1 test cases crash on s390x From: samding@ca.ibm.com ("Sam Ding") --0__=8FBB088EDFF292FA8f9e8a93df938690918c8FBB088EDFF292FA Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=US-ASCII Hi, When testing v7.2.1 on s390x two cases are found crash: 1) ext/mbstring/tests/mb=5Fereg.phpt ; 2) ext/mbstring/tests/mb=5Fereg=5Fvariation5.phpt] ; It happens at /home/work/php/php/ext/mbstring/oniguruma/src/regexec.c:2481, here is the code (replaced the macros): 2474 case OP=5FSTATE=5FCHECK=5FPUSH: MOP=5FIN(OP=5FSTATE=5FCHECK=5F= PUSH); 2475 GET=5FSTATE=5FCHECK=5FNUM=5FINC(mem, p); 2476 // STATE=5FCHECK=5FVAL(scv, mem); 2477 do { 2478 if (state=5Fcheck=5Fbuff !=3D NULL) { 2479 // int x =3D STATE=5FCHECK=5FPOS(s,mem); 2480 int x =3D (((s) - str) * num=5Fcomb=5Fexp=5Fcheck + ((mem) - 1)= ); 2481 (scv) =3D state=5Fcheck=5Fbuff[x/8] & (1<<(x%8)); 2482 } 2483 else (scv) =3D 0; 2484 } while(0); 2485 (gdb) p x $1 =3D 196680 (gdb) p x/8 $2 =3D 24585 However the array "state=5Fcheck=5Fbuff" index is 0--20311. "mem" is come from the macro "GET=5FSTATE=5FCHECK=5FNUM=5FINC", which ref= ers to "StateCheckNumType", Here is the definition of StateCheckNumType: in ext/mbstring/oniguruma/src/regint.h ... 530 typedef int MemNumType; 531 typedef short int StateCheckNumType; 532 typedef void* PointerType; ... Not understanding why StateCheckNumType is defined as short int, but others are all int. If change it as "int", two crashes are gone and 5 cases related to "mb=5Fereg() " are passed. Testing on x86=5F64 show 5 cases are alos passed (same as before). Thanks, Sam --0__=8FBB088EDFF292FA8f9e8a93df938690918c8FBB088EDFF292FA--