Bug #78941 [NEW]: Segfault with unparenthesized expressions containing both '.' and '+'/'-'
| From: | marcus at synchromedia dot co dot uk | Date: | Tue, 10 Dec 2019 14:33:43 +0000 |
| Subject: | Bug #78941 [NEW]: Segfault with unparenthesized expressions containing both '.' and '+'/'-' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-224201@lists.php.net to get a copy of this message | ||
From: marcus at synchromedia dot co dot uk
Operating system: macOS 10.14
PHP version: 7.4.0
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault with unparenthesized expressions containing both '.' and
'+'/'-'
Description:
------------
PHP 7.4.0 release installed from homebrew.
If code that triggers this warning:
> The behavior of unparenthesized expressions containing both '.' and
'+'/'-' will change in PHP 8: '+'/'-' will take a higher
precedence
appears in a base class, creating an instance of a subclass of it will
segfault.
Modules loaded:
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpdbg_webhelper
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
Test script:
---------------
I have provided a project to reproduce the crash:
https://github.com/Synchro/seg
git clone https://github.com/Synchro/seg.git
cd seg
composer install --dev
php vendor/bin/phpunit --no-configuration --filter "/(::testBase)(
.*)?$/" Synchro\seg\Test\segTest tests/segTest.php
php vendor/bin/phpunit --no-configuration --filter "/(::testGeneric)(
.*)?$/" Synchro\seg\Test\segTest tests/segTest.php
--
Edit bug report at https://bugs.php.net/bug.php?id=78941&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78941&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78941&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78941&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78941&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78941&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78941&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78941&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78941&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78941&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78941&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78941&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78941&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78941&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78941&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78941&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78941&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78941&r=mysqlcfg