Fix StaticLoc in closures

It was somewhat confused.

Reviewed By: @jdelong

Differential Revision: D1268767
Make mysqli_free_result warn if given something invalid

Depended on by phpbb. Doing it as a quick fix as we don't support zendparammode

fixes facebook/hhvm#2384

Reviewed By: @JoelMarcey

Differential Revision: D1268938
Factor out ARM reg saving, add SIMD support

This fixes an apparent bug in my last diff and makes life much easier
for my upcoming catch traces diff.

In the case where there are odd number of both SIMD and GP regs to save,
I could have saved space by packing both into the same 16-byte stack
slot, but I didn't because we're going to need to support 16-byte SIMD
registers soon.

Reviewed By: @swtaarrs

Differential Revision: D1268104
Delay using of runtime option EvalProfileHWEnable before it is parsed.

The diff is to delay using of the runtime option EvalProfileHWEnable
before it is parsed.

Currently, the value of RuntimeOption::EvalProfileHWEnable is used in
the constructor of HardwareCounterImpl, which is eventually called by
init_thread_locals inside execute_program in
program-function.cpp. However, runtime option parsing happens only
after init_thread_locals is called, which caused "using before
parsing" problem.

To solve the problem, move RuntimeOption::EvalProfileHWEnable usage
from the constructor of the HardwareCounterImpl to a seperate
initilization method. The method is then called when read() happens at
runtime. read() is expected to be called only after all options are
parsed.

Reviewed By: @ptarjan

Differential Revision: D1267669
Catch traces on ARM

We can't get away without this anymore, so here it is.

- The simulator's exception hook now searches for catch traces
  corresponding to the current address. If it finds one, it resets the
  simulator's PC to the start of the catch trace, and pushes the
  propagating exception onto a stack in the simulator.

- There's a little runtime helper called by EndCatch that tells the
  simulator to pop and rethrow the last exception from the stack. (It's
  a stack because in theory an exception can be thrown from code in a
  catch block, although that's not happening anywhere yet.)

- I haven't implemented the special handling for InvalidSetMException
  yet. We're still punting on enough codegen that it never actually
  comes into play. It's not going to be hard, AFAICT: the
  std::exception_ptr stuff will actually let us do everything we need,
  and as a bonus, it's portable.

- I did split out the exception hook into its own file, to avoid making
  enterTC() too much fatter. It's also in anticipation of adding more
  logic to it to handle InvalidSetMException.

Reviewed By: @swtaarrs

Differential Revision: D1268297
Fix proc_terminate with invalid signal argument.

Closes https://github.com/facebook/hhvm/issues/2107.
Closes #2301

Reviewed By: @ptarjan

Differential Revision: D1268395

Pulled By: @alexmalyshev
avoid using memory manager in pthread destructor

When a pthread exits, it will call the destructor function specified as
second argument to pthread_key_create. For some objects, this means
ThreadLocalOnThreadExit<T> which will simply delete the object.

In the case of BigintData, the destructor will try to access a property
for cleanup (freelist). Accessing this property requires a call to
pthread_getspecific. Calling pthread_getspecific from a pthread
destructor is undefined behavior and returns a nullptr on OS X
(and possibly BSD).

Let's avoid the need for pthread_getspecific by passing freelist as an
argument to destroy_freelist instead.
Closes #2385

Reviewed By: @scannell

Differential Revision: D1268873

Pulled By: @alexmalyshev
Send Travis notifications to #hhvm-dev
BCMarker: use SrcKey instead of (func, bcOff) tuple

Using SrcKey instead of (func, bcOff) tuple allows us to update SrcKey
logic and get the same effects on BCMarker for free. Also, reduces size
from 16 to 12 bytes (likely not going to help anything, but anyway).

Reviewed By: @swtaarrs

Differential Revision: D1268900
Fix bug in preOptimizeCheckStk

It was creating an AssertStk without its extra data.  Apparently we
never hit this path before. It hit occasionally in sandcastle with one
of my pending control-flow diffs.

Reviewed By: @swtaarrs

Differential Revision: D1267805
Match functions with no arguments

Closes #2383

Reviewed By: @scannell

Differential Revision: D1270152

Pulled By: @alexmalyshev
Add branch-over arcs to hottrace regions when bytecode control flow is on

Also, this diff changes the ids of region blocks so that they match
the ids of the profiling translation corresponding to them.

Reviewed By: @bertmaher

Differential Revision: D1265600
Updated frameworks.yaml to include more appropriate branch for phpbb

The phpbb devs mentioned that develop branch is potentially unstable with new features and that develop-ascraeus is more stable as it is the development branch for the next stable version, 3.1 (ascraeus).
https://wiki.phpbb.com/PhpBB3.1

It also includes the fixes @JoelMarcey submitted to them as mentioned in frameworks.yaml.
```
# Stable is release-3.0.12, but we have pull requests in develop
# https://github.com/phpbb/phpbb/pull/1908
# https://github.com/phpbb/phpbb/pull/2232
```
Closes #2404

Reviewed By: @fredemmott

Differential Revision: D1270615

Pulled By: @alexmalyshev
frameworks.yaml: upgrade symfony to v2.4.3, add clown.

The clown is ApcUniversalClassLoaderTest.php.

The test is incorrect. It's been fixed in symfony's master (https://github.com/symfony/symfony/pull/10577) but not in any of the releases.
Closes #2405

Reviewed By: @ptarjan

Differential Revision: D1270596

Pulled By: @alexmalyshev
fix makefile

it didn't compile anymore facebook specific hack code

Reviewed By: @avikchaudhuri

Differential Revision: D1270837
try to ban EZC from linting

I'm not sure if this works, but it is worth a try. It exists in `test/zend/` too.

Reviewed By: @jdelong

Differential Revision: D1269588
Guard dwarf_producer_init_X on bulid mode

FB build uses 'b' variant, world uses 'c'

Reviewed By: @ptarjan

Differential Revision: D1267268
Fix assertion on TRACE=printir

The previous diff makes BCMarker::func() no longer legal if BCMarker is
invalid or dummy. Avoid calling func() from printing code when in illegal
state.

Reviewed By: @alexmalyshev

Differential Revision: D1271298
Re-enable refcount opts on ARM

Forgot to do this when I got catch blocks working.

Reviewed By: @edwinsmith

Differential Revision: D1270262
Allow passing algo strings for openssl_sign and openssl_verify

openssl_verify and openssl_sign took an int where a mixed value should have been accepted using strings from `openssl_get_md_methods`.

Closes #2263

Reviewed By: @ptarjan

Differential Revision: D1270685