#38975 [WFx]: date() function causes php crash

From: Date: Mon, 16 Apr 2007 06:10:19 +0000
Subject: #38975 [WFx]: date() function causes php crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111522@lists.php.net to get a copy of this message
ID: 38975 Updated by: derick@php.net Reported By: rachmel at avaya dot com Status: Wont fix Bug Type: Reproducible crash Operating System: WindRiver Linux PHP Version: 5.1.6 New Comment: Right, but that would possibly break it for others of course... Previous Comments: ------------------------------------------------------------------------ [2007-04-15 06:44:41] rachmel at avaya dot com Hi, Well, changing the above lines in the configure script to: if test "$cross_compiling" = yes; then ac_cv_c_bigendian_php=yes fixed the bug for us. Thanks, Nir. ------------------------------------------------------------------------ [2007-04-13 14:31:10] derick@php.net We don't support cross compilation. Feel free to come up with a patch yourself though. ------------------------------------------------------------------------ [2006-10-25 10:41:03] rachmel at avaya dot com Hi, I think I found the problem. in one of the date extention files: parse_tz.c , there is a conversion macro called: timelib_conv_int() that has two modes - depends if WORDS_BIGENDIAN is defined or not. I located the test that defines it in the php configure file, and it looks like this: echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 echo "configure:43563: checking whether byte ordering is bigendian" >&5 if eval "test \"echo '$''{'ac_cv_c_bigendian_php'+set}'\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian_php=unknown if test "$cross_compiling" = yes; then ac_cv_c_bigendian_php=unknown else cat > conftest.$ac_ext <<EOF So, what happens is - i cross compile, and then the bigendian becomes uknown => the WORDS_BIGENDIAN is not defined => the timezone database is read in the wrong way => malloc tries to use that information to allocate memory and fails. Can you explain why it is that way? ------------------------------------------------------------------------ [2006-10-18 17:04:44] tony2001@php.net No, I don't think it matters. ------------------------------------------------------------------------ [2006-10-18 17:00:03] rachmel at avaya dot com ok, I will look into it. Do you think that using the timezonedb upgrade should make any difference? Thanks. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38975 -- Edit this bug report at http://bugs.php.net/?id=38975&edit=1

« previous php.bugs (#111522) next »