#23308 [Opn]: PHP Interpreter dies with Bus Error (Signal 10)
| From: | pavel dot may at csun dot edu | Date: | Wed, 23 Apr 2003 16:33:14 +0000 |
| Subject: | #23308 [Opn]: PHP Interpreter dies with Bus Error (Signal 10) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38224@lists.php.net to get a copy of this message | ||
ID: 23308
User updated by: pavel dot may at csun dot edu
Reported By: pavel dot may at csun dot edu
Status: Open
Bug Type: Reproducible crash
Operating System: HP-UX 11i (11.11)
PHP Version: 4.3.2-RC
New Comment:
Most excellent. I'll see what I can find out on my end by
experimenting, too.b
Previous Comments:
------------------------------------------------------------------------
[2003-04-22 21:53:01] rasmus@php.net
There are quite a few 64-bit fixes/changes that have gone into CVS
since 4.3.1. A lot of them by an HP engineer in Cupertino. I'll see
if I can poke him to take a look at this bug report.
------------------------------------------------------------------------
[2003-04-22 21:45:12] pavel dot may at csun dot edu
Re: GetTimeOfDay and UniqID:
From the 4.3.2-RC config.log:
configure:20209: checking for gettimeofday
configure:20259: cc -o conftest +DD64 +z -I/usr/local/include
-I/usr/include -I/usr/ccs/include -I/opt/include +DD64 +z
-I/usr/local/include -I/usr/include -I/usr/ccs/include -I/opt/include
+s +z +DD64 -L/lib/pa20_64 -L/opt/lib/pa20_64 -L/usr/local/lib
-L/usr/ccs/lib -L/usr/lib
-L/opt/local/appdev/software/oracle/product/8.1.7/lib64
-L/opt/local/appdev/software/oracle/product/8.1.7/lib conftes
t.c -lm -lpthread -lcl -lnsl -lnm -ldld -lm -lc -lsec >&5
cc: warning 422: Unknown option "s" ignored.
cc: "configure", line 20317: warning 573: Parameter list is
inconsistent for "gettimeofday".
cc: "configure", line 20317: error 1584: Inconsistent type declaration:
"gettimeofday".
cc: "configure", line 20324: warning 604: Pointers are not
assignment-compatible.
cc: "configure", line 20333: warning 605: Illegal pointer combination
for !=.
configure:20262: $? = 1
configure: failed program was:
| #line 20214 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define YYTEXT_POINTER 1
| #define PHP_APACHE_HAVE_CLIENT_FD 1
| #define MISSING_LOCALTIME_R_DECL 1
| #define MISSING_GMTIME_R_DECL 1
| #define MISSING_ASCTIME_R_DECL 1
| #define MISSING_CTIME_R_DECL 1
| #define MISSING_STRTOK_R_DECL 1
| #define HAVE_SENDMAIL 1
| #define HAVE_SOCKET 1
| #define HAVE_GETHOSTNAME 1
| #define HAVE_GETHOSTBYADDR 1
| #define HAVE_YP_GET_DEFAULT_DOMAIN 1
| #define HAVE_DLOPEN 1
| #define HAVE_LIBDL 1
| #define HAVE_LIBM 1
| #define HAVE_RES_SEARCH 1
| #define HAVE_INET_ATON 1
| #define HAVE_DN_SKIPNAME 1
| #define STDC_HEADERS 1
| #define HAVE_DIRENT_H 1
| #define MISSING_FCLOSE_DECL 0
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_ARPA_NAMESER_H 1
| #define HAVE_ASSERT_H 1
| #define HAVE_CRYPT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_GRP_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MONETARY_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_PWD_H 1
| #define HAVE_RESOLV_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_SYSEXITS_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_BROKEN_GLIBC_FOPEN_APPEND 1
| #define HAVE_TZNAME 1
| #define HAVE_STRUCT_FLOCK 1
| #define HAVE_SOCKLEN_T 1
| #define SIZEOF_LONG 8
| #define SIZEOF_INT 4
| #define HAVE_VPRINTF 1
| #define HAVE_DOPRNT 1
| #define HAVE_ALPHASORT 1
| #define HAVE_ASCTIME_R 1
| #define HAVE_CHROOT 1
| #define HAVE_CTIME_R 1
| #define HAVE_CUSERID 1
| #define HAVE_CRYPT 1
| #define HAVE_FTOK 1
| #define HAVE_GCVT 1
| #define HAVE_GETLOGIN 1
| #define HAVE_GETPROTOBYNAME 1
| #define HAVE_GETPROTOBYNUMBER 1
| #define HAVE_GETSERVBYNAME 1
| #define HAVE_GETSERVBYPORT 1
| #define HAVE_GETRUSAGE 1
| /* end confdefs.h. */
| /* System header to define __stub macros and hopefully few
prototypes,
| which can conflict with char gettimeofday (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char gettimeofday ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
| choke me
| #else
| char (*f) () = gettimeofday;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != gettimeofday;
| ;
| return 0;
| }
configure:20279: result: no
Oddly enough, in 4.3.1 under 'you will compile HPPA 1.1/32bit targets'
regime, config.log has:
configure:13876: checking for gettimeofday
configure:13904: cc -o conftest +DA1.1 +z -I/usr/local/include
-I/usr/include -I/usr/ccs/include +DA1.1 +z -I/usr/local/include
-I/usr/include -I/usr/ccs/include +s -L/usr/local/lib -L/usr/ccs/lib
-L/usr/lib -L/opt/local/appdev/software/oracle/product/8.1.7/lib64
-L/opt/local/appdev/software/oracle/product/8.1.7/lib conftest.c -lm
-lcl -lpthread -lnsl -lnm -ldld -lm -lc -lcrypt -lsec 1>&5
cc: warning 422: Unknown option "s" ignored.
------------------------------------------------------------------------
[2003-04-22 21:26:27] pavel dot may at csun dot edu
Re: UniqID() and HAVE_GETTIMEOFDAY in main/php_config.h:
I'll try to recompile with a 64-bit C/LDFLAGS and see. First, 32-bit
compile with all the funky configure options :) (I want to give
something to the users and move on from there).
------------------------------------------------------------------------
[2003-04-22 21:22:02] pavel dot may at csun dot edu
I've forced the compiler to compile to the HPPA 1.1 spec (32-bit) with
bare -- directives for configure and all seems well. I'll try the full
ugly thing I was trying originally in a bit.
From the gmake test:
=====================================================================
TIME END 2003-04-22 16:29:40
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 80
Exts tested : 8
---------------------------------------------------------------------
Number of tests : 443
Tests skipped : 229 (51.7%)
Tests failed : 5 ( 1.1%)
Tests passed : 209 (47.2%)
---------------------------------------------------------------------
Time taken : 154 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #21131: fopen($filename, "a+") has broken position
[ext/standard/tests/file/bug21131.phpt]
Various pow() tests [ext/standard/tests/math/pow.phpt]
Test strtoupper on non-ASCII characters
[ext/standard/tests/strings/strtoupper.phpt]
strtotime() function [ext/standard/tests/time/002.phpt]
Check for mktime with out-of-range parameters
[ext/standard/tests/time/003.phpt]
=====================================================================
(Posted to qa.php.net)
I was uncomfortable seeing so many tests fail for stuff that should
have worked.
If I may be so bold as to suggest a strategy here, I'd say have
configure check the CFLAGS/LDFLAGS environment variables and either
override them or complain bitterly (later is what I like to see, but
that is a separate issue).
For reference, here's my environment:
[277]$ set | grep "FLAGS"
CFLAGS=+DA1.1 +z -I/usr/local/include -I/usr/include
-I/usr/ccs/include
CPPFLAGS=+DA1.1 +z -I/usr/local/include -I/usr/include
-I/usr/ccs/include
LDFLAGS=+s -L/usr/local/lib -L/usr/ccs/lib -L/usr/lib
With HP's ANSI C compiler, the architechture target is defined by the
+DA1.1 or +DA2.0 or +DD64.
Unfortunately, I am still learning about Makefile, ./configure and
their bretheren, so I do not have an exact patch available.
------------------------------------------------------------------------
[2003-04-22 20:17:36] rasmus@php.net
uniqid() is only available if HAVE_GETTIMEOFDAY is defined. Did the
configure check for gettimeofday() fail on you? Check your
main/php_config.h file to see if it is defined and also your config.log
file to see if you can figure out why the configure check failed.
But, apart from the make test stuff, does it work?
------------------------------------------------------------------------
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/23308
--
Edit this bug report at http://bugs.php.net/?id=23308&edit=1