#19275 [NEW]: socket_create causes seg fault / unaligned trap
| From: | info at proustmedia dot de | Date: | Sat, 07 Sep 2002 11:46:42 +0000 |
| Subject: | #19275 [NEW]: socket_create causes seg fault / unaligned trap | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-18609@lists.php.net to get a copy of this message | ||
From: info@proustmedia.de
Operating system: Debian2.2r3 on Alpha, ker.2.2.19
PHP version: 4.2.3
PHP Bug Type: Sockets related
Bug description: socket_create causes seg fault / unaligned trap
I cannot use the socket_create function on my Alpha, I only get a
segmentation fault. I already noticed this problem with
PHP4.2.2.
$ cat socket_create.php
<?php
$socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
?>
$ build/php -q socket_create.php
php(25979): unaligned trap at 00000001201c0acc: 000000011fffe354 27 10
php(25979): unaligned trap at 00000001201c0acc: 000000011fffe35c 27 10
Erreur de segmentation [segmentation fault]
$ gdb build/php
GNU gdb 19990928
Copyright 1998 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 "alphaev56-unknown-linux-gnu"...
(gdb) run -q socket_create.php
Starting program: /home/fric/make/php-standalone/build/php -q
socket_create.php
Program received signal SIGSEGV, Segmentation fault.
0x1200c5478 in zif_socket_create (ht=3, return_value=0x1203cfb90,
this_ptr=0x0, return_value_used=1)
at /home/fric/make/php-standalone/php-4.2.3/ext/sockets/sockets.c:888
888 php_sock->bsd_socket = socket(arg1, arg2, arg3);
(gdb) bt
#0 0x1200c5478 in zif_socket_create (ht=3, return_value=0x1203cfb90,
this_ptr=0x0, return_value_used=1)
at /home/fric/make/php-standalone/php-4.2.3/ext/sockets/sockets.c:888
#1 0x1201ffcd4 in execute (op_array=0x1203cfcc0) at
../../php-4.2.3/Zend/zend_execute.c:1598
#2 0x1201bf9a0 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at ../../php-4.2.3/Zend/zend.c:812
#3 0x12002a524 in php_execute_script (primary_file=0x11ffff8a8) at
/home/fric/make/php-standalone/php-4.2.3/main/main.c:1383
#4 0x120025838 in main (argc=3, argv=0x11ffffaf8) at
/home/fric/make/php-standalone/php-4.2.3/sapi/cgi/cgi_main.c:778
(gdb)
My configuration was:
../php-4.2.3/configure \
--with-zlib \
--enable-calendar \
--enable-dbase \
--enable-ftp \
--with-gd=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/local \
--with-mysql=/usr \
--with-pdflib \
--enable-exif \
--enable-sockets \
--enable-pcntl \
--enable-debug
My system is a SX 164 Alpha running GNU/Linux Debian 2.2r3 with a 2.2.19
patched kernel for ext fs 3 support.
$ uname -a
Linux alpha 2.2.19ext3 #5 Sat May 25 16:33:30 CEST 2002 alpha unknown
Please let me know if I can do something to help fix this problem.
With best regards,
Fabrice Haberer-Proust
Proust Media
Kerngasse 3/1
79576 Weil am Rhein
Germany
--
Edit bug report at http://bugs.php.net/?id=19275&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19275&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19275&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19275&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19275&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19275&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19275&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19275&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19275&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19275&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19275&r=globals