segfault when running header?

php.internals

Chris Malton

19 years ago
The header() function currently causes a segfault with CVS head sources. Here's a backtrace. #0 _zend_mm_free_int (heap=0xb302f0, p=0xb88b11b) at /root/php6/Zend/zend_alloc.c:1522 #1 0x00000000006a5d4f in destroy_op_array (op_array=0x2ae269e4d410) at /root/php6/Zend/zend_opcode.c:265 #2 0x00000000006e0085 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ( execute_data=0x7fff40c85d10) at /root/php6/Zend/zend_vm_execute.h:2039 #3 0x00000000006d7bbc in execute (op_array=0x2ae269e4ce30) at /root/php6/Zend/zend_vm_execute.h:92 #4 0x00000000006b0663 in zend_execute_scripts (type=8, retval=0xb88b11b, file_count=3) at /root/php6/Zend/zend.c:1630 #5 0x0000000000662883 in php_execute_script (primary_file=0x7fff40c883e0) at /root/php6/main/main.c:1951 #6 0x000000000073d394 in main (argc=2, argv=0x7fff40c8a648) at /root/php6/sapi/cgi/cgi_main.c:1660 I'll leave this up to a dev team person to sort. I am merely testing out php6 before a migration. Need any more info? Give me a buzz. Chris

Antony Dovgal

19 years ago
On 02/07/2007 10:18 PM, Chris Malton wrote:
> The header() function currently causes a segfault with CVS head sources. > > I'll leave this up to a dev team person to sort. I am merely testing > out php6 before a migration.
Migration to PHP6?
> Need any more info? Give me a buzz.
A reproduce case?
-- Wbr, Antony Dovgal

Chris Malton

19 years ago
Antony Dovgal wrote:
> > On 02/07/2007 10:18 PM, Chris Malton wrote: >> >> The header() function currently causes a segfault with CVS head
sources.
>> >> >> >> I'll leave this up to a dev team person to sort. I am merely testing >> >> out php6 before a migration. > > > > Migration to PHP6? > >
When it is released... of course! This is testing server, and I'm seeing what gets broken by PHP6!
>> >> Need any more info? Give me a buzz. > > > > A reproduce case? > >
WHOOPS - Turns out it isn't header that breaks it! The following code breaks php6 at the cmd line. <?php if($_GET["ffcheck"]==""){ $ua=$_SERVER['HTTP_USER_AGENT']; if(strpos($ua,"MSIE")!==false){ *segfaults HERE* //USER AGENT = MSIE! header("Location: http://shared.cjsoftuk.dyndns.org/Firefox.php?URL=" . urlencode("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "?" . $_SERVER["QUERY_STRING"])); exit(); } } ?> In php5, it works fine. PHP 6 seems to segfault on empty strings! Chris

Stanislav Malyshev

19 years ago
Chris Malton wrote:
> The header() function currently causes a segfault with CVS head sources. > > Here's a backtrace. > > #0 _zend_mm_free_int (heap=0xb302f0, p=0xb88b11b) > at /root/php6/Zend/zend_alloc.c:1522 > #1 0x00000000006a5d4f in destroy_op_array (op_array=0x2ae269e4d410) > at /root/php6/Zend/zend_opcode.c:265
Doesn't seem to be in header() - header() doesn't do that.
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/