Ask a Question related to PHP Development, Design and Development.
-
stas@php.net #1
#24550 [Ver->Csd]: tokenizing & syntax highlighting crashes
ID: 24550
Updated by: [email]stas@php.net[/email]
Reported By: hos dot endre at axelero dot hu
-Status: Verified
+Status: Closed
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5.0.0b2-dev
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at [url]http://snaps.php.net/[/url].
In case this was a documentation problem, the fix will show up soon at
[url]http://www.php.net/manual/[/url].
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-07-09 06:47:16] [email]sniper@php.net[/email]
[Switching to Thread 1024 (runnable)]
lex_scan (zendlval=0xbffff2b8) at
/usr/src/web/php/php5/Zend/zend_language_scanner.l:988
988 char *func_name = CG(active_op_array)->function_name;
(gdb) bt
#0 lex_scan (zendlval=0xbffff2b8) at
/usr/src/web/php/php5/Zend/zend_language_scanner.l:988
#1 0x813f070 in zend_highlight (syntax_highlighter_ini=0xbffff354) at
/usr/src/web/php/php5/Zend/zend_highlight.c:176
#2 0x81313db in highlight_string (str=0x40298ccc,
syntax_highlighter_ini=0xbffff354,
str_name=0x402992d4 "Command line code(1) : highlighted code")
at /usr/src/web/php/php5/Zend/zend_language_scanner.l:461
#3 0x80c8094 in zif_highlight_string (ht=1, return_value=0x402992b4,
this_ptr=0x0, return_value_used=0)
at /usr/src/web/php/php5/ext/standard/basic_functions.c:2251
#4 0x816b63d in zend_do_fcall_common_helper (execute_data=0xbffff43c,
op_array=0x4029905c)
at /usr/src/web/php/php5/Zend/zend_execute.c:2664
#5 0x816bbc2 in zend_do_fcall_handler (execute_data=0xbffff43c,
op_array=0x4029905c)
at /usr/src/web/php/php5/Zend/zend_execute.c:2793
#6 0x815bc54 in execute (op_array=0x4029905c) at
/usr/src/web/php/php5/Zend/zend_execute.c:1266
#7 0x813ea61 in zend_eval_string (str=0xbffff7d7
"highlight_string('<?__METHOD__');", retval_ptr=0x0,
string_name=0x81ae354 "Command line code") at
/usr/src/web/php/php5/Zend/zend_execute_API.c:803
#8 0x8175114 in main (argc=3, argv=0xbffff674) at
/usr/src/web/php/php5/sapi/cli/php_cli.c:1001
#9 0x401b19cb in __libc_start_main (main=0x8174378 <main>, argc=3,
argv=0xbffff674, init=0x80696a0 <_init>,
fini=0x8175724 <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbffff66c)
at ../sysdeps/generic/libc-start.c:92
(gdb)
------------------------------------------------------------------------
[2003-07-08 17:13:14] hos dot endre at axelero dot hu
Description:
------------
Tokenizer function (token_get_all) crashes and Apache is going down
immediately, when a newly introduced __METHOD__ constant have found in
the script. Workx good with __FUNCTION__ constant, now I'm gonna use
__FUNCTION__ in my script, but might be problem one day for others...
I guess the sample code wont crash before PHP5, because if I write
anything else instead of __METHOD__, parser assumes that it's ok!
Compiler handles this constant, so the scripts works well with
__METHOD__, but should be untokenizable for documentation generators.
Now I tried syntax highlighting: same result, as I expected.
By the way: in the sample code I use __METHOD__ out of a method,
originally the problem came up in a method's body.
Reproduce code:
---------------
// I hope you like this - the shortest crasher formula:
highlight_string('<?__METHOD__');
Expected result:
----------------
I expect crash.
Actual result:
--------------
Doctor, what's on?
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=24550&edit=1[/url]
stas@php.net Guest
-
Syntax-Highlighting
Hi there, is there a plug-in or extension for dreamweaver which enables syntax-highlighting ? Thank you very much, greets, ben -
SQL query text breaks syntax highlighting
The following code messes up dreamweaver's syntax highlighting. Im assuming it's because the parser sees the bracket and thinks it's a tag. ... -
Perl Syntax Highlighting
Greetings fellow members, I am in search for Perl/CGI definitions for use within CodeColoring.xml and Colors.xml. Perl syntax highlighting would... -
custom syntax highlighting in html-kit
Hello, I'd REALLY REALLY like to be able to modify the syntax highlighting in html-kit. Is this possible? Right now in PHP if you have a line... -
VIM - no syntax highlighting on console
On Sat, 02 Aug 2003 22:20:06 +0200 Jaque Moreau <mr.wimpy@firemail.de> wrote: In command mode (in VI), type ":syntax on" and see if that fixes...



Reply With Quote

