ID:               48508
 User updated by:  webmaster at ajeux dot com
 Reported By:      webmaster at ajeux dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         PHAR related
 Operating System: Linux 2.6.28
 PHP Version:      5.3CVS-2009-06-09 (snap)
 Assigned To:      cellog
 New Comment:

File can be found here : http://www.ajeux.fr/cli.bz2
It contains a single file cli.php

Download this file and launch this:
<?php
include 'cli.bz2';
?>

Now that I'm more familiar with Phar, I'm not sure this is phar
related. I'm just including something that is absolutely not a php
readable file, don't I ?

Same SEGFAULT (ie same line/file) when including a bz2 archive that
contains a file containing the string 'iiiaaaoouu'; (yes, this is not a
php syntax, I can see that ;)   ).

What do you think ?


Previous Comments:
------------------------------------------------------------------------

[2009-06-18 18:08:57] cel...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

I can't reproduce this, and the download link has expired.

Can you also please say from which directory you are running the
script?

------------------------------------------------------------------------

[2009-06-18 17:55:36] cel...@php.net

thanks for the heads up, I'll take a look

------------------------------------------------------------------------

[2009-06-09 14:22:49] webmaster at ajeux dot com

Description:
------------
Trying to include a specific .phar leads to a segfault under Linux.

The .phar is a bz2 archive, and very small (just one file inside).
Source of the file can be found here : 
http://uploadfile.org/download.php?id=EqxNUSSdIgcpKKCgrkgG

Bug seems to happen with any .phar.bz2 file.

Reproduce code:
---------------
<?php

include 'cli.phar.bz2';


Expected result:
----------------
working :)

Actual result:
--------------
Segmentation fault

(gdb) run test.php
Starting program: /usr/bin/php53 test.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb7bd88c0 (LWP 14183)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7bd88c0 (LWP 14183)]
lex_scan (zendlval=0xbfadd56c) at Zend/zend_language_scanner.c:919
919                     if (yych != '<') goto yy4;
(gdb) bt
#0  lex_scan (zendlval=0xbfadd56c) at Zend/zend_language_scanner.c:919
#1  0x08299954 in zendlex (zendlval=0xbfadd568) at
/usr/src/olivier/php5.3-200906091030/Zend/zend_compile.c:4880
#2  0x08280c79 in zendparse () at
/usr/src/olivier/php5.3-200906091030/Zend/zend_language_parser.c:3280
#3  0x08286139 in compile_file (file_handle=0xbfadd77c, type=2) at
Zend/zend_language_scanner.l:343
#4  0x08181f75 in phar_compile_file (file_handle=0xbfadd77c, type=2) at
/usr/src/olivier/php5.3-200906091030/ext/phar/phar.c:3360
#5  0x08285c41 in compile_filename (type=2, filename=0xb7ba47dc) at
Zend/zend_language_scanner.l:386
#6  0x082f1e94 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER
(execute_data=0xb7453028) at
/usr/src/olivier/php5.3-200906091030/Zend/zend_vm_execute.h:1914
#7  0x082daad2 in execute (op_array=0xb7ba44d0) at
/usr/src/olivier/php5.3-200906091030/Zend/zend_vm_execute.h:104
#8  0x082b4bcd in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/olivier/php5.3-200906091030/Zend/zend.c:1188
#9  0x0825c4c9 in php_execute_script (primary_file=0xbfadfc68) at
/usr/src/olivier/php5.3-200906091030/main/main.c:2196
#10 0x08342101 in main (argc=2, argv=0xbfadfdc4) at
/usr/src/olivier/php5.3-200906091030/sapi/cli/php_cli.c:1188



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48508&edit=1

Reply via email to