Bug #78342 [NEW]: Bus error in configure test for iconv //IGNORE
| From: | rainer dot jung at kippdata dot de | Date: | Sun, 28 Jul 2019 18:46:03 +0000 |
| Subject: | Bug #78342 [NEW]: Bus error in configure test for iconv //IGNORE | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221959@lists.php.net to get a copy of this message | ||
From: rainer dot jung at kippdata dot de
Operating system: Solaris 10 Sparc
PHP version: 7.4.0beta1
Package: *Compile Issues
Bug Type: Bug
Bug description:Bus error in configure test for iconv //IGNORE
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
--
Edit bug report at https://bugs.php.net/bug.php?id=78342&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78342&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78342&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78342&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78342&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78342&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78342&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78342&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78342&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78342&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78342&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78342&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78342&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78342&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78342&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78342&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78342&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78342&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78342&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78342&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78342&r=mysqlcfg