# Memory corruptions related to AST patch

- Thread: https://externals.io/message/77096
- Original archive: https://news-web.php.net/php.internals/77096
- Started by Dmitry Stogov on 2014-09-08T07:26:10+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #77096 — Dmitry Stogov — 2014-09-08T07:26:10+00:00

URL: https://externals.io/message/77096#77096

Hi Nikita,

On weekend I ran PHP test suite with valgrind and opcache.
I noticed few new tests failures, that most probably introduced by AST
patch.

Bug #21820 ("$arr['foo']" generates bogus E_NOTICE, should be E_PARSE)
[tests/lang/bug21820.phpt]
Bug #66286: Incorrect object comparison with inheritance
[Zend/tests/bug66286.phpt]
unbraced complex variable replacement test (heredoc)
[Zend/tests/heredoc_005.phpt]
isset() can be used on dereferences of temporary expressions
[Zend/tests/varSyntax/issetOnTemp.phpt]

I suppose they indicate two different problems.
One of them indicates that some zvals became a subject for GC, however they
won't before. This may be fixed in opcache, but it's better to understand
what was changed.

Please take a look.

Thanks. Dmitry.

---

## #77110 — Nikita Popov — 2014-09-09T10:31:44+00:00

URL: https://externals.io/message/77096#77110 · In reply to: #77096

> Hi Nikita,
>
> On weekend I ran PHP test suite with valgrind and opcache.
> I noticed few new tests failures, that most probably introduced by AST
> patch.
>
> Bug #21820 ("$arr['foo']" generates bogus E_NOTICE, should be E_PARSE)
> [tests/lang/bug21820.phpt]
> Bug #66286: Incorrect object comparison with inheritance
> [Zend/tests/bug66286.phpt]
> unbraced complex variable replacement test (heredoc)
> [Zend/tests/heredoc_005.phpt]
> isset() can be used on dereferences of temporary expressions
> [Zend/tests/varSyntax/issetOnTemp.phpt]
>
> I suppose they indicate two different problems.
> One of them indicates that some zvals became a subject for GC, however
> they won't before. This may be fixed in opcache, but it's better to
> understand what was changed.
>
> Please take a look.
>
> Thanks. Dmitry.
>

For the record, these have been resolved by
https://github.com/php/php-src/commit/af84d5737c47c3ec3959e056f171b14ab76fb7b8
and
https://github.com/php/php-src/commit/c59300ac86dd02bcdacd6c1460a5b43e91a5bf49
.

Nikita
