Edit report at https://bugs.php.net/bug.php?id=71304&edit=1
ID: 71304
Updated by: laruence@php.net
Reported by: php_bug at binsp dot net
Summary: Apache exit with signal 10 when use iconv
Status: Open
Type: Bug
Package: ICONV related
Operating System: Linux & BSD
PHP Version: 7.0.2
Block user comment: N
Private report: N
New Comment:
I can not reproduce this
Previous Comments:
------------------------------------------------------------------------
[2016-01-07 18:14:49] php_bug at binsp dot net
To reproduce
php -r "iconv ( 'UTF-8', 'ASCII//TRANSLIT', 'PHP_BUG' );"
Bus error (core dumped)
------------------------------------------------------------------------
[2016-01-07 18:09:19] php_bug at binsp dot net
To reproduce bug
php -r "iconv ( 'UTF-8', 'ASCII//TRANSLIT', 'PHP_BUG' );"
return => Bus error (core dumped)
------------------------------------------------------------------------
[2016-01-07 17:58:18] php_bug at binsp dot net
change summary
------------------------------------------------------------------------
[2016-01-07 17:43:12] php_bug at binsp dot net
Description:
------------
Sorry for my english
When i want rename uploaded file apache exit with signal 10
kernel: pid 12219 (httpd), uid 80: exited on signal 10 (core dumped)
PHP 7.0.2 (cli) (built: Jan 7 2016 12:43:59) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
[PHP Modules] Core curl date dom filter gettext hash iconv imagick json libxml mbstring openssl pcre
pgsql Reflection session SPL standard yac
FreeBSD srv1.xxxx 10.2-RELEASE-p7 FreeBSD 10.2-RELEASE-p7
I have the same issue with Linux Sun 4.3.3-2-ARCH #1
the probleme appear at update to 7.0.2 when I realize it I tested without probleme on another server
with php 7.0.1
When I updated this server I had the same problem.
Test script:
---------------
public static function slugMe($str, $replace=array(), $delimiter='-')
{
if (!empty($replace)) {
$str = str_replace((array)$replace, ' ', $str);
}
$sluged = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
$sluged = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $sluged);
$sluged = strtolower(trim($sluged, '-'));
$sluged = preg_replace("/[\/_|+ -]+/", $delimiter, $sluged);
return $sluged;
}
Actual result:
--------------
(gdb) bt
#0 0x0000000801bd7bc1 in __bsd_iconv () from /lib/libc.so.7
#1 0x00000008041edf2a in php_iconv_string (in_p=0x806472130 "zoom.jpg", in_len=8,
out=0x7fffffffce50, out_charset=<value optimized out>, in_charset=<value optimized out>)
at iconv.c:654
#2 0x00000008041eb915 in php_if_iconv (execute_data=<value optimized out>,
return_value=0x8064131d0) at iconv.c:2462
#3 0x00000008043c96fb in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x8064130e0) at
zend_vm_execute.h:714
#4 0x00000008043951f8 in execute_ex (ex=<value optimized out>) at zend_vm_execute.h:417
#5 0x0000000804395438 in zend_execute (op_array=0x806475000, return_value=<value optimized
out>) at zend_vm_execute.h:458
#6 0x0000000804356b9f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:1427
#7 0x00000008042f6443 in php_execute_script (primary_file=0x7fffffffe630) at main.c:2471
#8 0x00000008043e3d45 in php_handler (r=0x8026b4290) at sapi_apache2.c:678
#9 0x0000000000452197 in ap_invoke_handler ()
#10 0x0000000000467c76 in ap_internal_redirect ()
#11 0x0000000803c3edc0 in ?? () from /usr/local/libexec/apache24/mod_rewrite.so
#12 0x0000000000452197 in ap_invoke_handler ()
#13 0x000000000046777f in ap_process_async_request ()
#14 0x0000000000467819 in ap_process_request ()
#15 0x00000000004643ec in ap_expr_yyrealloc ()
#16 0x000000000045c886 in ap_process_connection ()
#17 0x000000000046edd3 in ap_set_etag ()
#18 0x000000000046e91f in ap_set_etag ()
#19 0x000000000046e113 in ap_set_etag ()
#20 0x00000000004374cd in ap_run_mpm ()
#21 0x000000000043085f in main ()
bt full
#1 0x00000008041edf2a in php_iconv_string (in_p=0x806472130 "zoom.jpg", in_len=8,
out=0x7fffffffce50, out_charset=<value optimized out>, in_charset=<value optimized out>)
at iconv.c:654
out_left = 40
in_left = 8
out_left = 40
out_p = 0x8064a2248 "\030\"J\006\b"
in_left = 8
in_left = 8
out_p = 0x8064a2248 "\030\"J\006\b"
retval = Cannot access memory at address 0x6
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71304&edit=1