Bug #78342 [PATCH]: Bus error in configure test for iconv //IGNORE

From: Date: Sun, 28 Jul 2019 18:46:50 +0000
Subject: Bug #78342 [PATCH]: Bus error in configure test for iconv //IGNORE
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221960@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78342&edit=1 ID: 78342 Patch added by: rainer.jung@kippdata.de Reported by: rainer dot jung at kippdata dot de Summary: Bus error in configure test for iconv //IGNORE Status: Open Type: Bug Package: *Compile Issues Operating System: Solaris 10 Sparc PHP Version: 7.4.0beta1 Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2019-07-28 18:46:03] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78342&edit=1

« previous php.bugs (#221960) next »