Bug #71129 [NEW]: Segmentation fault on ZTS Embed SAPI

From: Date: Tue, 15 Dec 2015 15:46:52 +0000
Subject: Bug #71129 [NEW]: Segmentation fault on ZTS Embed SAPI
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197910@lists.php.net to get a copy of this message
From:             maroszek at gmx dot net
Operating system: OS X 11.11
PHP version:      7.0.0
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Segmentation fault on ZTS Embed SAPI

Description:
------------
PHP 7 is current stable
PHP 7 is build as a static library

./configure '--disable-fpm' '--disable-cgi' '--disable-cli'
'--enable-embed=static' '--enable-maintainer-zts' '--without-iconv'

g++ --version
> Apple LLVM version 7.0.2 (clang-700.1.81)
> Target: x86_64-apple-darwin15.2.0
> Thread model: posix

I build a simple example to demonstrate the threading problem. 
On OS X the example crashes within a second. 

Sourcecode: https://gist.github.com/paresy/b4babb919a86e9764bc4

Copy crash.cpp into your php7 folder.
Compile with: g++ crash.cpp -Imain -Itsrm -Izend -I. --std=c++11 -Llibs
-lphp7 -lxml2 -lresolv

empty.php:
<?

Start it. It should crash. :-)

PS: PHP 5.5 and probably 5.6 is affected as well.

Expected result:
----------------
No crash. Endless loop doing the work. 

Actual result:
--------------
Segmentation fault: 11

and a lot of warnings which make no real sense:
<b>Fatal error</b>:  Maximum execution time of 30 seconds exceeded in
<b>Unknown</b> on line <b>0</b><br />

-- 
Edit bug report at https://bugs.php.net/bug.php?id=71129&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71129&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71129&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71129&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71129&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71129&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71129&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71129&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71129&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71129&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71129&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71129&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71129&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71129&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71129&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71129&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71129&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71129&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71129&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71129&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71129&r=mysqlcfg



Thread (32 messages)

« previous php.bugs (#197910) next »