ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Dev
php-Dev
#28578 [Asn]: segfault when tidy parses PHP code
by other posts by this author
May 31 2004 1:16PM messages near this date
#28578 [Asn]: segfault when tidy parses PHP code | #28578 [Opn->Asn]: segfault when tidy parses PHP code
ID:               28578
 Updated by:       nlopess@[...].net
 Reported By:      nlopess@[...].net
 Status:           Assigned
 Bug Type:         Unknown/Other Function
 Operating System: win
 PHP Version:      5CVS-2004-05-30 (dev)
 Assigned To:      john
 New Comment:

I've built PHP with latest tidy lib on cygwin and it doesn't segfault.
The problem can be in the libTidy itself, as the binaries provided by
the snaps machine use a very old version of the libTidy.


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

[2004-05-31 12:17:41] derick@[...].net

Works for me on linux, assigning to the maintainer.

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

[2004-05-30 22:36:58] jed at jed dot bz

Heh, sorry. That would be 0xC0000005.

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

[2004-05-30 22:35:07] jed at jed dot bz

PHP 5.0.0RC2. Run via CLI.

I was able to reproduce this bug. My gut feeling, which I will check
after I submit this debug info (I have the debugger attached at
present), is that <?php ?>  will parse correctly.

Unhandled exception in php.exe (PHP_TIDY.DLL): 0xC00000005: Access
Violation.

Unfortunately, I do not have the debug build of PHP. Best I can offer
you is this:

PHP_TIDY! 00ab93fe()

That's my call stack. Sorry. I'll get the debug version of PHP and
recheck this later, if I remember.

Rechecking my initial gut suspicion, this piece of code works fine.

$tidy = tidy_parse_string('<?php ?> ');

My advice at present is to not use short tags in tidy-parsed code, as
tidy's logic probably does not recognize <? ?>  and attempts to parse
it.

However, a worthy problem for looking into.

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

[2004-05-30 14:14:01] nlopess@[...].net

Description:
------------
Using the provided script, PHP segfaults.

Reproduce code:
---------------
<?php
$tidy = tidy_parse_string('<? ?> ');
?> 



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


-- 
Edit this bug report at http://bugs.php.net/?id=28578&edit=1
Thread:
nlopess@php.net




jed at jed dot bz
jed at jed dot bz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved