Hi Dmitry,

----- Original Message -----
From: "Dmitry Stogov"
Sent: Thursday, April 30, 2009

Hi Matt,

Does this patch fix EOF handling issues related to mmap()? (e.g. parsing of files with size 4096, 8192, ...). Now we have two dirty fixes to handle them correctly.

I'm not really sure about the mmap() stuff, and haven't followed the workarounds that you or Brian have done... But as far as scanning strings/comments, there shouldn't be an EOF problem with them after my changes. Those were the ones that could contain NULL and got the EOF NULL(s) confused and scan too far. I guess that's the ZEND_MMAP_AHEAD padding...? So I don't know if reverting the "dirty fixes" would then still cause any problems with re2c scanning other tokens (that can't contain NULL).

Brian would know more I guess, sooner than I could look into what to revert, when I don't fully understand that part.

The patch is quite big to understand it quickly. I'll probably take a look on weekend.

OK. I think the patch looks more complicated and is larger because of so many removed lines. :-)

-ANY_CHAR [^\x00]
+ANY_CHAR [^]

Is [^] a correct regular expression?

In re2c, yes, as Scott said.  [^] is what it was before Brian excluded NULL.

Thanks. Dmitry.


- Matt

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to