Always raise a mem exceeded exception after a request OOM
commit733ffe5b36bfc2532c4d0c0ca0747676db6caa8a
authorMichael O'Farrell <michaelofarrell@fb.com>
Wed, 21 Apr 2021 19:51:59 +0000 (21 12:51 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 21 Apr 2021 19:53:21 +0000 (21 12:53 -0700)
treea1910ba54810233e85aac6199409de01c35eeff6
parent5cdbdb5da080cb54e1cdb92f8046e07804b2843d
Always raise a mem exceeded exception after a request OOM

Summary:
The introduction of host triggered request OOMs in D7230817 (https://github.com/facebook/hhvm/commit/3b613d1986fb1e73c221af2e4742e36474413263) repurposed the
MemExceededFlag.  It also made it so sometime when the MemExceededFlag is set,
we don't throw an exception.  This broke things that assume we always throw
an exception after a request level OOM.

This fix isn't the best option.  Ideally we would introduce an extra surprise
flag section so we don't have to manually multiplex the uses of the
MemExceededFlag.  For now this extends the hacks introduced in D7230817 (https://github.com/facebook/hhvm/commit/3b613d1986fb1e73c221af2e4742e36474413263).

Reviewed By: ricklavoie, binliu19

Differential Revision: D27886650

fbshipit-source-id: a6efe8e58331d8217836f10be83834a52fc63019
hphp/runtime/base/memory-manager.cpp
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/request-info.cpp
hphp/runtime/base/request-injection-data.h
hphp/runtime/ext/std/ext_std_intrinsics.cpp