From:             [EMAIL PROTECTED]
Operating system: Linux 2.6.23-gentoo-r5
PHP version:      5.3CVS-2008-01-16 (CVS)
PHP Bug Type:     Reproducible crash
Bug description:  Segmentation fault in dns_get_record

Description:
------------
Segmentation fault for:

$ php -r 'var_dump( dns_get_record( "localhost", DNS_A ) );'
Segmentation fault

Reproduce code:
---------------
php -r 'var_dump( dns_get_record( "localhost", DNS_A ) );'

Expected result:
----------------
Not a segfault.

Actual result:
--------------
[EMAIL PROTECTED] trunk $ php -v
PHP 5.3.0-dev (cli) (built: Jan 17 2008 00:10:25) (DEBUG)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies
    with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans
[EMAIL PROTECTED] trunk $ gdb php
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -r 'var_dump( dns_get_record( "localhost", DNS_A ) );'
Starting program: /usr/bin/php -r 'var_dump( dns_get_record( "localhost",
DNS_A ) );'
[Thread debugging using libthread_db enabled]
[New Thread 0xb62af6d0 (LWP 13199)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb62af6d0 (LWP 13199)]
0x0839ec12 in _zval_dtor (zvalue=0xeb0, __zend_filename=0x8774038
"/home/kore/bin/php/php-5.3-cvs/php-src/ext/standard/dns.c",
__zend_lineno=672) at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_variables.h:32
32              if (zvalue->type <= IS_BOOL) {
(gdb) bt
#0  0x0839ec12 in _zval_dtor (zvalue=0xeb0, __zend_filename=0x8774038
"/home/kore/bin/php/php-5.3-cvs/php-src/ext/standard/dns.c",
__zend_lineno=672) at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_variables.h:32
#1  0x0839e32f in zif_dns_get_record (ht=2, return_value=0x8936aec,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/home/kore/bin/php/php-5.3-cvs/php-src/ext/standard/dns.c:672
#2  0x084a7b82 in execute_internal (execute_data_ptr=0xbf8cabac,
return_value_used=1) at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_execute.c:1436
#3  0xb61feb24 in xdebug_execute_internal
(current_execute_data=0xbf8cabac, return_value_used=1) at
/tmp/pear/cache/xdebug-2.0.2/xdebug.c:1573
#4  0x084a8346 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf8cabac) at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_vm_execute.h:193
#5  0x084ad545 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbf8cabac) at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_vm_execute.h:1393
#6  0x084a7e29 in execute (op_array=0x89364f0) at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_vm_execute.h:87
#7  0xb61fe7b3 in xdebug_execute (op_array=0x89364f0) at
/tmp/pear/cache/xdebug-2.0.2/xdebug.c:1509
#8  0x0847315e in zend_eval_string (str=0xbf8cc12e "var_dump(
dns_get_record( \"localhost\", DNS_A ) );", retval_ptr=0x0,
string_name=0x87b3644 "Command line code")
    at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_execute_API.c:1262
#9  0x084732fe in zend_eval_string_ex (str=0xbf8cc12e "var_dump(
dns_get_record( \"localhost\", DNS_A ) );", retval_ptr=0x0,
string_name=0x87b3644 "Command line code", handle_exceptions=1)
    at
/home/kore/bin/php/php-5.3-cvs/php-src/Zend/zend_execute_API.c:1295
#10 0x085146c7 in main (argc=3, argv=0xbf8cb034) at
/home/kore/bin/php/php-5.3-cvs/php-src/sapi/cli/php_cli.c:1179
(gdb) quit


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

Reply via email to