Don't deadlock when bytecode verification fails
commit1efc5d7f4cd45625403a92646f516f2b84ea6cf6
authorMark Williams <mwilliams@fb.com>
Wed, 20 Feb 2019 17:12:50 +0000 (20 09:12 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 20 Feb 2019 17:16:57 +0000 (20 09:16 -0800)
treea43ebe25d3ba7eaec8a2982ddfbfad2e03172b0a
parent386cb597659bf3d02f775a0e42638544b8c426e2
Don't deadlock when bytecode verification fails

Summary:
Calling std::exit from a multi-threaded process is always risky. In
this case we would regularly deadlock due to global variables being
destroyed while threads were trying to use them (specifically s_ueq in
emitter.cpp seemed to be a problem).

Switch to _Exit instead.

This test *did* usually pass, because it would produce the expected
output (verification failure), then deadlock until its timeout, at
which point it was silently killed... so everything was happy.

Reviewed By: paulbiss

Differential Revision: D14107642

fbshipit-source-id: 94b6b39171a9cf6324f6d215392c3f8fb0c40052
hphp/hhbbc/parse.cpp
hphp/hhbbc/whole-program.cpp