Delete stack protection in GetScalarArray
commit8b86c2c0d4057878c35a92083be2705b37ae7dc5
authorJoseph Griego <jgriego@fb.com>
Sun, 1 Mar 2020 17:57:54 +0000 (1 09:57 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 1 Mar 2020 18:02:25 +0000 (1 10:02 -0800)
tree6d56b2cdc50fbb442b134fc5613834a6f1ccd963
parent877086e8b04deec0d9ee2c9a95e6baf46fc344eb
Delete stack protection in GetScalarArray

Summary:
This was added to make the test in test/slow/parser/memory_exhaust.hhas pass
but we now have some stack protection in the deserializer and this also
interacts badly with backtrace.cpp--w/ array provenance enabled it's possible
to get into a loop where GetScalarArray exceeds the stack limit, so we raise a
ExtendedException, which computs a backtrace, which calls GetScalarArray, stack
limit still exceeded, and so on.

For now I want to sidestep the issue by eliding the check in GetScalarArray.
This puts it in the same category as e.g. ObjectData::release: functions that
will consume native stack space proportional to the nesting of their inputs but
that lack stack protection.

Reviewed By: ricklavoie

Differential Revision: D20162748

fbshipit-source-id: 3592d2e3bce2047970957a0d6ffc31656aa48146
hphp/runtime/base/array-data.cpp