Subject: Re: Problems installing php4 on a VS4000/60
To: Charles H. Dickman <chd_1@nktelco.net>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-vax
Date: 08/17/2004 19:29:33
On Sat, 7 Aug 2004, Charles H. Dickman wrote:

> I made a clean install of 1.6.2 without a hitch. When I try to install
> php4 from the packages, a floating point exception occurred during the
> install of pear. That install is done by a php program. There is a core
> dump, and with gdb the core shows that the exception was in the middle
> of a vax CALLS instruction... All I really know about vax guts is what I
> have read in books... :-(

  Are you sure about the location of the exception?  I got the wrong php
executable the first time, which showed:

Program terminated with signal 8, Arithmetic exception.
#0  0x000468a2 in basic_globals_ctor ()
(gdb) x/i $pc
0x468a2 <basic_globals_ctor+46>:        calls $5,@0x4e190 <zif_passthru+66>

  This didn't make much sense.  Checking the Makefile showed me my
mistake, and using the correct php results in:

Program terminated with signal 8, Arithmetic exception.
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols
found)...
done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/lib/libcrypt.so.0...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.0
Reading symbols from /usr/lib/libssl.so.3...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libssl.so.3
Reading symbols from /usr/lib/libcrypto.so.2...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libcrypto.so.2
Reading symbols from /usr/lib/libm.so.0...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libc.so.12
#0  0x000468a2 in php_get_inf ()
(gdb) x/i $pc
0x468a2 <php_get_inf+2>:        divd3 #0.000000,$1.000000,r0

  This is much more reasonable, and results because of:

PHPAPI double php_get_inf(void)
{
#if HAVE_HUGE_VAL_NAN
        return HUGE_VAL;
#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
        double val = 0;
        ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
        ((php_uint32*)&val)[0] = 0;
        return val;
#elif HAVE_ATOF_ACCEPTS_INF
        return atof("INF");
#else
        return 1.0/0.0;
#endif
}


--
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA