sektioneins / suhosin7

Suhosin Extension for PHP 7.x
https://www.suhosin.org
Other
120 stars 25 forks source link

Segfaults in suhosin_zend_stream_open #6

Open remicollet opened 8 years ago

remicollet commented 8 years ago

Running composer test suite

#0  0x00007fffd37c04a7 in suhosin_zend_stream_open (filename=0x7fffd00210d8 "/tmp/composer-test-789256d928b949161/src/Lala/ClassMapMain.php", handle=0x7fffffff8fd0) at /usr/src/debug/php70-php-suhosin-0.10.0/NTS/execute.c:303
#1  0x00005555557b9b44 in zend_stream_fixup (file_handle=file_handle@entry=0x7fffffff8fd0, buf=buf@entry=0x7fffffff8f78, len=len@entry=0x7fffffff8f80) at /usr/src/debug/php-7.0.4/Zend/zend_stream.c:186
#2  0x0000555555765a66 in open_file_for_scanning (file_handle=file_handle@entry=0x7fffffff8fd0) at Zend/zend_language_scanner.l:508
#3  0x00005555556dcba1 in zif_php_strip_whitespace (execute_data=<optimized out>, return_value=0x7ffff381af60)
    at /usr/src/debug/php-7.0.4/ext/standard/basic_functions.c:5180
#4  0x000055555578d1ea in dtrace_execute_internal (execute_data=<optimized out>, return_value=<optimized out>)
    at /usr/src/debug/php-7.0.4/Zend/zend_dtrace.c:107
#5  0x0000555555820fe0 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.4/Zend/zend_vm_execute.h:844
#6  0x00005555557dcb4b in execute_ex (ex=ex@entry=0x7ffff381ad90) at /usr/src/debug/php-7.0.4/Zend/zend_vm_execute.h:414
#7  0x000055555578d081 in dtrace_execute_ex (execute_data=0x7ffff381ad90) at /usr/src/debug/php-7.0.4/Zend/zend_dtrace.c:83
#8  0x00007fffd37c05b4 in suhosin_execute_ex (execute_data=0x7ffff381ad90) at /usr/src/debug/php70-php-suhosin-0.10.0/NTS/execute.c:533
#9  0x000055555582111d in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.4/Zend/zend_vm_execute.h:800
#10 0x00005555557dcb4b in execute_ex (ex=ex@entry=0x7ffff381a920) at /usr/src/debug/php-7.0.4/Zend/zend_vm_execute.h:414
...
bef commented 8 years ago

The composer test suite does not cause such an error here. Can you elaborate on how to cause this error, please: OS, composer version, which test exactly, what extensions php has loaded and compiled in

remicollet commented 8 years ago

OS: Fedora 23 Composer: 1.0.0beta1 Extensions

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
recode
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
suhosin7
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zlib

[Zend Modules]

Tests causing segfault

 tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
 tests/Composer/Test/Autoload/ClassMapGeneratorTest.php
remicollet commented 8 years ago

Additionnal info:

Build options:

--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches \
-m64 -mtune=generic

And reproduced with 8a5f1a302a848b37ba737e7db3f618f309128700

yusha commented 5 years ago

Any update on this yet?