Bug #71066 [NEW]: mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault.

From: Date: Tue, 08 Dec 2015 20:46:05 +0000
Subject: Bug #71066 [NEW]: mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197704@lists.php.net to get a copy of this message
From:             ae at devil-coding dot de
Operating system: Debian 8 Jessie (x64)
PHP version:      7.0.0
Package:          Mail related
Bug Type:         Bug
Bug description:mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault.

Description:
------------
I've noticed that the mb_send_mail() function causes a Segmentation
fault error.
When I execute the test code below I'm only recive a Segmentation fault
error message to stderr. It seems that mb_send_mail crashes here.

Here is the gdb backtrace for the Segmentation fault error:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
32      ../sysdeps/x86_64/multiarch/../strchr.S: No such file or
directory.
(gdb) bt
#0  __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
#1  0x00000000006d5fc7 in zif_mb_send_mail (execute_data=0x7f61b0a152e0,
return_value=0x7f61b0a152c0) at
/tmp/php/php-7.0.0/ext/mbstring/mbstring.c:4117
#2  0x0000000000a27e12 in ZEND_DO_ICALL_SPEC_HANDLER () at
/tmp/php/php-7.0.0/Zend/zend_vm_execute.h:586
#3  0x0000000000a2784a in execute_ex (ex=0x7f61b0a15030) at
/tmp/php/php-7.0.0/Zend/zend_vm_execute.h:414
#4  0x0000000000a2795f in zend_execute (op_array=0x7f61b0a88000,
return_value=0x0) at /tmp/php/php-7.0.0/Zend/zend_vm_execute.h:458
#5  0x00000000009cdb89 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /tmp/php/php-7.0.0/Zend/zend.c:1428
#6  0x0000000000940eda in php_execute_script
(primary_file=0x7ffe9b72a810) at /tmp/php/php-7.0.0/main/main.c:2471
#7  0x0000000000a8b9e2 in do_cli (argc=2, argv=0x2d5f660) at
/tmp/php/php-7.0.0/sapi/cli/php_cli.c:974
#8  0x0000000000a8c98d in main (argc=2, argv=0x2d5f660) at
/tmp/php/php-7.0.0/sapi/cli/php_cli.c:1345


Configure:
./configure --prefix=/usr/local --with-bz2 --enable-calendar --with-curl
--enable-exif --enable-ftp --with-gd --with-jpeg-dir
--enable-gd-native-ttf --enable-mbstring --with-mcrypt --with-pcre-regex
--enable-soap --enable-sockets --enable-zip --with-zlib --enable-fpm
--with-config-file-path=/etc/php5
--with-mysql-sock=/var/run/mysqld/mysqld.sock --with-pdo-mysql
--with-mysqli --enable-shmop --enable-opcache --with-freetype-dir
--enable-debug

Test script:
---------------
define('ADMIN_MAIL', 'mail@example.net');
define('NAME', 'Backoffice');
define('DEFAULT_HOST', 'example.net');

admin_mail('test', 'some text for testing');

function admin_mail($subject, $text) {

    if($text !== '') {
        
        $headers = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/plain; charset=UTF-8' . "\r\n";
        $headers .= 'From: ESO-Database System <no-reply@' .
DEFAULT_HOST . '>' . "\r\n";

        mb_send_mail(ADMIN_MAIL, NAME . ' Adminmail | ' . $subject,
$text, $headers);
	}
}


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



Thread (3 messages)

« previous php.bugs (#197704) next »