[PATCH] major bug in mmap of lexer
| From: | Gregory Beaver | Date: | Tue, 29 Apr 2008 03:02:05 +0000 |
| Subject: | [PATCH] major bug in mmap of lexer | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-37280@lists.php.net to get a copy of this message | ||
Hi,
Today while testing phar with phpMyAdmin, I was getting a really weird
error - one of the files was turning into a series of Z's, munging the
entire display. Thinking it was a phar issue, I instead tracked it down
to a major problem in an edge case of zend_stream_fixup(). For files
that are about 4085 bytes long, the buffer containing them was being
erealloc()ed without re-assigning the new value to the zend_file_handle,
resulting in efreed() value filled with Z's if --enable-debug was in the
configure line (whew). A simple order change of assignment solves this one.
The attached patches against 5_3 and HEAD fixes this and saves the day
for pharred phpMyAdmin.
Greg