hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

HHVM results in a fatal error when accessing a property that contains a NUL byte.

Open azjezz opened this issue 4 years ago • 1 comments
trafficstars

Describe the bug

HHVM results in a fatal error when accessing a property which name contains a NUL byte.

This is most likey inherited from the fact that PHP 5.0 prefixed private/protected properties with NUL byte, later on in PHP 7.0, PHP started throwing an Error when attempting to access a property using NUL byte, which HHVM also did.

However, since 09/12/2020, this changed to a fatal error: https://github.com/facebook/hhvm/commit/68ecce841e8897d1ec2af89c3f2600cfea1aabc4

Standalone code, or other way to reproduce the problem

https://gist.github.com/fredemmott/a39231a07477138e4b502c8932b977aa

Expected behavior

undefined property warning/exception (depending on hhvm config)

Actual behavior

fatal error.

azjezz avatar Jun 16 '21 19:06 azjezz

this changed to a fatal error

This was a 'fatal error', however we previously threw even for 'non-recoverable' fatal errors. This one probably shouldn't have been a fatal error in the first place.

fredemmott avatar Jun 16 '21 19:06 fredemmott