php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74014 iconv crashes PHP on FreeBSD
Submitted: 2017-01-30 13:05 UTC Modified: 2017-02-02 23:38 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: nti at w4w dot net Assigned: cmb (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.6.30 OS: FreeBSD 10.3
Private report: No CVE-ID: None
 [2017-01-30 13:05 UTC] nti at w4w dot net
Description:
------------
It's hard to find the reason for this crashes of php-fpm:

"exited on signal 10 (SIGBUS)" 

on various circumstances. But's the iconv modul (php 5.6.30 and also 7.0.15) that causes this on newer FreeBSD versions. Disabling the modul solves the problem.
On the cli you can reproduce the crash with
php -r 'echo iconv("UTF-8", "UTF-8", "Hello, world.\n");'
[1]    36583 bus error (core dumped)  php -r 'echo iconv("UTF-8", "UTF-8", "Hello, world.\n");

Bug 72198 also describes the problem but someone should do something because iconv is not useable on FreeBSD at present.

Test script:
---------------
php -r 'echo iconv("UTF-8", "UTF-8", "Hello, world.\n");'



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-31 10:44 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2017-01-31 10:44 UTC] cmb@php.net
Duplicate of bug #72198.
 [2017-01-31 21:50 UTC] nti at w4w dot net
Same bug here
https://bugs.php.net/bug.php?id=71374
https://bugs.php.net/bug.php?id=71304
 [2017-02-02 23:38 UTC] nti at w4w dot net
-Status: Duplicate +Status: Closed
 [2017-02-02 23:38 UTC] nti at w4w dot net
I've installed multiple PHP versions with --prefix=/usr/local/phpXX

Under this circumstance libiconv seems not be correctly linked

With "CONFIGURE_ARGS+=--with-iconv=/usr/local"

it woks now
 [2017-04-12 15:40 UTC] ypnow at 163 dot com
There is a patch can fix this problem for php-5.x, see: https://bugs.php.net/bug.php?id=72198

But not for php-7.x.

This bug only happend on FreeBSD, not for linux.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 22:01:31 2024 UTC