php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78342 Bus error in configure test for iconv //IGNORE
Submitted: 2019-07-28 18:46 UTC Modified: 2019-07-29 06:48 UTC
From: rainer dot jung at kippdata dot de Assigned: cmb (profile)
Status: Closed Package: *Compile Issues
PHP Version: 7.2Git-2019-07-29 (Git) OS: Solaris 10 Sparc
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rainer dot jung at kippdata dot de
New email:
PHP Version: OS:

 

 [2019-07-28 18:46 UTC] rainer dot jung at kippdata dot de
Description:
------------
The configure test for iconv //IGNORE results in a Bus error on Solaris 10 Sparc.

It occurs on recent 7.4 beta, but also in current 7.2 and probably dates back much further.

The crash is due to the following snippet in file ext/iconv/config.m4:

int main() {
  iconv_t cd = iconv_open( "UTF-8//IGNORE", "UTF-8" );
=> no check for result of iconv_open here!
  char *in_p = "\xC3\xC3\xC3\xB8";
  size_t in_left = 4, out_left = 4096;
  char *out = malloc(out_left);
  char *out_p = out;
  size_t result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
  if(result == (size_t)-1) {
    return 1;
  }
  return 0;
}




Test script:
---------------
Run configure on Solaris 10 Sparc. config.log shows:

configure:37401: checking if iconv supports //IGNORE
...
configure:37435: ./conftest
./configure[20]: 4274 Bus Error(coredump)
configure:37435: $? = 138
configure: program exited with status 138



Patches

php-configure-iconv-ignore.patch (last revision 2019-07-28 18:46 UTC by rainer dot jung at kippdata dot de)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-28 18:46 UTC] rainer dot jung at kippdata dot de
The following patch has been added/updated:

Patch Name: php-configure-iconv-ignore.patch
Revision:   1564339610
URL:        https://bugs.php.net/patch-display.php?bug=78342&patch=php-configure-iconv-ignore.patch&revision=1564339610
 [2019-07-29 06:48 UTC] cmb@php.net
-Status: Open +Status: Verified -PHP Version: 7.4.0beta1 +PHP Version: 7.2Git-2019-07-29 (Git) -Assigned To: +Assigned To: cmb
 [2019-07-29 06:48 UTC] cmb@php.net
Thanks for reporting this issue and providing a patch.  Since this
is certainly a bug, the fix should target PHP-7.2.
 [2019-07-29 06:52 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=30eb4b3563f508019d306c3c62311f43d4ce6682
Log: Fix #78342: Bus error in configure test for iconv //IGNORE
 [2019-07-29 06:52 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC