php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22076 PHP 4.3.0 crashes on OpenBSD 3.2 sparc64 when zlib is linked
Submitted: 2003-02-05 11:29 UTC Modified: 2003-07-30 05:34 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: slash at peereboom dot us Assigned:
Status: No Feedback Package: Zlib related
PHP Version: 4.3.0 OS: OpenBSD 3.2 SPARC64
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: slash at peereboom dot us
New email:
PHP Version: OS:

 

 [2003-02-05 11:29 UTC] slash at peereboom dot us
I posted the following email on the OpenBSD list and no-one knew of this. I guess it belongs here.

Email:
I am at a loss trying to get PHP 4.3.0 to work on sparc64 using OpenBSD 3.2-release. I have been messing around with this for quite a bit now and I can't get the damned thing to work. What I did find out is that the problems are caused by linking zlib (tried the shipped one and also the latest source). When I tried to debug the issue gdb bombed on me as well.

Excerpt:
[root@sparc64 php-4.3.0]# gdb sapi/cgi/php
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB.  Type "show warranty" for details. This GDB was configured as "sparc64-unknown-openbsd3.2"...
(gdb) run
Starting program: /root/php-4.3.0/sapi/cgi/php 
Dwarf Error: Cannot find referent at offset 507.
(gdb) bt
Segmentation fault (core dumped)

Anyone any ideas?

I did get it compiled with other stuff as long as it does not require zlib. Problem for me is that I need gd functionality which depends on zlib. I searched the PHP site as well as the archives and google but to no avail.

dmesg:
OpenBSD 3.2 (GENERIC) #8: Thu Oct  3 20:00:17 MDT 2002
 
deraadt@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC
total memory = 134217728
avail memory = 115785728
using 819 buffers containing 6709248 of memory
bootpath: /pci@1f,0/pci@1,1/ide@3,0/disk@0,0
mainbus0 (root): SUNW,Ultra-5_10
cpu0 at mainbus0: SUNW,UltraSPARC-IIi @ 299.825 MHz, version 0 FPU
cpu0: physical 32K instruction (32 b/l), 16K data (32 b/l), 512K external (64 b/l) psycho0 at mainbus0 addr 0xfffc4000
SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 2; PCI bus 0
IOTDB: 7c6000 to 846000
pci0 at psycho0
ppb0 at pci0 dev 1 function 1 "Sun Simba PCI-PCI" rev 0x11
pci1 at ppb0 bus 1
ebus0 at pci1 dev 1 function 0 "Sun PCIO Ebus2" rev 0x01
auxio0 at ebus0 addr 726000-726003, 728000-728003, 72a000-72a003, 72c000-72c003, 72f000-72f003 power at ebus0 addr 724000-724003 ipl 37 not configured SUNW,pll at ebus0 addr 504000-504002 not configured sab0 at ebus0 addr 400000-40007f ipl 43: rev 3.2 sabtty0 at sab0 port 0 sabtty1 at sab0 port 1 comkbd0 at ebus0 addr 3083f8-3083ff ipl 41: layout 34 wskbd0 at comkbd0: console keyboard com0 at ebus0 addr 3062f8-3062ff ipl 42, mouse: ns16550a, 16 byte fifo lpt0 at ebus0 addr 3043bc-3043cb, 30015c-30015d, 700000-70000f ipl 34: polled fdthree at ebus0 addr 3023f0-3023f7, 706000-70600f, 720000-720003 ipl 39 not configured clock0 at ebus0 addr 0-1fff: mk48t59: hostid 8093c4db flashprom at ebus0 addr 0-fffff not configured audioce0 at ebus0 addr 200000-2000ff, 702000-70200f, 704000-70400f, 722000-722003 ipl 35 ipl 36: nvaddrs 0 audio0 at audioce0 hme0 at pci1 dev 1 function 1 "Sun HME" rev 0x01: address 08:00:20:93:c4:db nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 1
hme0: using ivec 3021 for interrupt
vgafb0 at pci1 dev 2 function 0 "ATI Mach64 GT" rev 0x9a wsdisplay0 at vgafb0
wsdisplay0: screen 0 added (sun, sun emulation)
pciide0 at pci1 dev 3 function 0 "CMD Technology PCI0646" rev 0x03: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using ivec 1820 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST34342A>
wd0: 16-sector PIO, LBA, 4103MB, 8894 cyl, 15 head, 63 sec, 8404830 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <GoldStar, CD-ROM CRD-8240B, 1.24> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
ppb1 at pci0 dev 1 function 0 "Sun Simba PCI-PCI" rev 0x11
pci2 at ppb1 bus 2
siop0 at pci2 dev 1 function 0 "Symbios Logic 53c875" rev 0x14 using on-board RAM ivec 10 scsibus1 at siop0: 16 targets siop1 at pci2 dev 1 function 1 "Symbios Logic 53c875" rev 0x14 using on-board RAM ivec 11 scsibus2 at siop1: 16 targets creator0 at mainbus0 addr 0xfebee000: Creator3D, model SUNW,501-4788 wsdisplay1 at creator0: console (std, sun emulation), using wskbd0 pcons at mainbus0 not configured No counter-timer -- using %tick at 299MHz as system clock. root on wd0a rootdev=0xc00 rrootdev=0x1a00 rawdev=0x1a02

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-05 12:24 UTC] kalowsky@php.net
Can you please compile with --enable-debug, crash the program and then give us the backtrace? :)
 [2003-02-05 13:04 UTC] slash at peereboom dot us
./configure --with-zlib --enable-debug
<snip>

[root@sparc64 php-4.3.0]# ./sapi/cgi/php
Bus error (core dumped)

[root@sparc64 php-4.3.0]# gdb -c php.core ./sapi/cgi/php
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64-unknown-openbsd3.2"...
Core was generated by `php'.
Program terminated with signal 10, Bus error.

Dwarf Error: Cannot find referent at offset 507.
(gdb) bt
Segmentation fault (core dumped)


Sorry, that is as good as it gets from a backtrace. I have done this on two different boxes (U5 & U10) with the same results.
 [2003-02-05 13:34 UTC] magnus@php.net
Looks like something is wrong with your gdb.. I had the 
same problem (gdb coredumping on me), but on Tru64.. 
It went away when I compiled gdb with Compaq's native C 
compiler.. 
 [2003-02-05 13:47 UTC] slash at peereboom dot us
vi a.c
int main()
{
        char *a, *b;
        a = 0;
        b = 0;
        strcpy(a, b);

        return 0;
}

[root@sparc64 root]# gcc -o a a.c -g

[root@sparc64 root]# ./a
Segmentation fault (core dumped)

[root@sparc64 root]# gdb -c a.core a
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64-unknown-openbsd3.2"...
Core was generated by `a'.
Program terminated with signal 11, Segmentation fault.
#0  0x403855b0 in ?? ()
(gdb) bt
#0  0x403855b0 in ?? ()
#1  0x1004dc in ___start ()
(gdb) 

Seems to work...

I used OpenBSD's 3.2 native compiler and debugger.

[root@sparc64 root]# gcc -v
Reading specs from /usr/lib/gcc-lib/sparc64-unknown-openbsd3.2/2.95.3/specs
gcc version 2.95.3 20010125 (prerelease)

[root@sparc64 root]# gdb -v
GNU gdb 4.16.1
 [2003-02-05 16:17 UTC] msopacua@php.net
What's the zlib version on this box and could you cat/paste config.nice?
 [2003-02-05 16:27 UTC] slash at peereboom dot us
[root@sparc64 php-4.3.0]# cat config.nice 
#! /bin/sh
#
# Created by configure

'./configure' \
'--with-zlib' \
'--enable-debug' \
"$@"

[root@sparc64 php-4.3.0]# l /usr/lib/libz*
-r--r--r--  1 root  bin  83270 Oct  3 20:28 /usr/lib/libz.a
-r--r--r--  1 root  bin  67266 Oct  3 20:28 /usr/lib/libz.so.1.4
-r--r--r--  1 root  bin  91040 Oct  3 20:28 /usr/lib/libz_p.a
-r--r--r--  1 root  bin  82904 Oct  3 20:28 /usr/lib/libz_pic.a

I also downloaded zlib 1.1.4 and compiled it myself with the same results.
 [2003-05-09 07:30 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-07-21 13:24 UTC] php at gotontheinter dot net
latest stable doesn't build for me on obsd 3.2/sparc64:
/bin/sh /opt/php4-STABLE-200307211730/libtool --silent --preserve-dup-deps --mode=compile gcc -mv8 -mcpu=v9 -m64  -Iext/iconv/ -I/opt/php4-STABLE-200307211730/ext/iconv/ -DPHP_ATOM_INC -I/opt/php4-STABLE-200307211730/include -I/opt/php4-STABLE-200307211730/main -I/opt/php4-STABLE-200307211730 -I/opt/php4-STABLE-200307211730/Zend -I/usr/local/include -I/usr/local//include -I/opt/php4-STABLE-200307211730/ext/xml/expat  -I/opt/php4-STABLE-200307211730/TSRM  -g -O2  -prefer-pic -c /opt/php4-STABLE-200307211730/ext/iconv/iconv.c -o ext/iconv/iconv.lo
/opt/php4-STABLE-200307211730/ext/iconv/iconv.c:43: `#include' expects "FILENAME" or <FILENAME>

Config.nice has (direct from the 4.2.3 ports):
#
# Created by configure

CC='gcc -mv8 -mcpu=v9 -m64' \
'./configure' \
'--with-apxs=/usr/sbin/apxs' \
'--enable-cli' \
'--with-iconv=/usr/local/' \
'--with-gettext=/usr/local' \
'--enable-dio' \
'--without-pear' \
'--enable-bcmath' \
'--enable-session' \
'--enable-trans-sid' \
'--enable-calendar' \
'--enable-ctype' \
'--enable-ftp' \
'--with-pcre-regex' \
'--with-posix' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-yp' \
"$@"
 [2003-07-21 13:26 UTC] php at gotontheinter dot net
(PS: Posted here rather than a new bug because the original bug bites me on 4.2.3.)
 [2003-07-30 05:34 UTC] moriyoshi@php.net
php at gotontheinter dot net:
Could you send me your config.log? <moriyoshi@php.net>



 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 19:01:31 2024 UTC