Bug #71066 [Opn->Csd]: mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault.
| From: | laruence@php.net | Date: | Wed, 09 Dec 2015 01:47:50 +0000 |
| Subject: | Bug #71066 [Opn->Csd]: mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197715@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71066&edit=1
ID: 71066
Updated by: laruence@php.net
Reported by: ae at devil-coding dot de
Summary: mb_send_mail: Program terminated with signal
SIGSEGV, Segmentation fault.
-Status: Open
+Status: Closed
Type: Bug
Package: Mail related
Operating System: Debian 8 Jessie (x64)
PHP Version: 7.0.0
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=84b997020ea47b10172207196136291c5ff09443
Log: Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault)
Previous Comments:
------------------------------------------------------------------------
[2015-12-08 20:57:32] ae at devil-coding dot de
It looks like this header causes the error:
$headers .= 'Content-type: text/plain; charset=UTF-8' . "\r\n";
Without this line I get no Segmentation fault error.
------------------------------------------------------------------------
[2015-12-08 20:46:03] ae at devil-coding dot de
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 this bug report at https://bugs.php.net/bug.php?id=71066&edit=1