#34926 [NEW]: gethostbyname gives segmentation fault in cli

From: Date: Thu, 20 Oct 2005 08:39:22 +0000
Subject: #34926 [NEW]: gethostbyname gives segmentation fault in cli
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86792@lists.php.net to get a copy of this message
From:             php at m0z dot net
Operating system: FreeBSD 5.x
PHP version:      5.0.5
PHP Bug Type:     Network related
Bug description:  gethostbyname gives segmentation fault in cli

Description:
------------
PHP segfaults when trying to resolve a hostname internally. We encountered
this with mysql_connect, gethostbyname, socket_connect in:
- PHP 5.0.5 (cgi-fcgi AND cli)
- PHP 4.4.0
All when run from shell.

Reproduce code:
---------------
<?php
echo gethostbyname("www.google.com");
?>

Expected result:
----------------
64.233.183.99

Actual result:
--------------
Segmentation fault (core dumped)

gdb backtrace:
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x2955a5b9 in ?? () from /usr/local/lib/nss_ldap.so.1
#2  0x29565f40 in ?? () from /usr/local/lib/nss_ldap.so.1
#3  0x2819c760 in ?? () from /libexec/ld-elf.so.1
#4  0x2819c5d8 in ?? () from /libexec/ld-elf.so.1
#5  0x2955a554 in ?? () from /usr/local/lib/nss_ldap.so.1
#6  0x28181730 in _rtld_error () from /libexec/ld-elf.so.1
#7  0x29563d8d in _fini () from /usr/local/lib/nss_ldap.so.1
#8  0x2818280b in find_symdef () from /libexec/ld-elf.so.1
#9  0x28182e6a in dlclose () from /libexec/ld-elf.so.1
#10 0x2848953c in _nsdbtput () from /lib/libc.so.5
#11 0x28488ef0 in endhostent () from /lib/libc.so.5
#12 0x284895bb in _nsdbtput () from /lib/libc.so.5
#13 0x284ac1a5 in __cxa_finalize () from /lib/libc.so.5
#14 0x284abec6 in exit () from /lib/libc.so.5
#15 0x0815017b in main ()


-- 
Edit bug report at http://bugs.php.net/?id=34926&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34926&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34926&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34926&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34926&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34926&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34926&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34926&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34926&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34926&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34926&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=34926&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=34926&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34926&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34926&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34926&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34926&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34926&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34926&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34926&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34926&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#86792) next »