facebook / facebook/hhvm

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

Open
#8,848 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

**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.

Contributor guide

Open the contributing guide

Research direction

Start with the standalone reproduction in the linked gist and inspect the behavior change introduced by commit 68ecce841e8897d1ec2af89c3f2600cfea1aabc4. Confirm that accessing a property containing a NUL byte produces the expected undefined-property warning or exception rather than a fatal error, including the relevant HHVM configuration behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, php
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.