Move freeInline decision from translateRegion to hhbc-translator

Summary: One less NormalizedInstruction use.

Reviewed By: @alexmalyshev

Differential Revision: D1651076

Signature: t1:1651076:1414994554:e4ef2e98dbaa4bbcfa05f859394815b37d0b47d4
Make sure Type::Bottom is a subtype of everything

Summary: Specialized object types were failing this; possibly other cases.

Reviewed By: @alexmalyshev

Differential Revision: D1653805
Pull out enough of D1629737 to fix an minstr bug (BlockPauser)

Summary: I've run into this while working on getting rid of inner ref types.

I used a different name so I didn't need to rename the other callsites, but it
should be easy to merge.

Reviewed By: @alexmalyshev

Differential Revision: D1653906

Signature: t1:1653906:1414805508:2f03f689a323f69c991c7b69592c3978f04e1c37
Allow various PROGRAMs to decide what updates they want to receive

Summary: Previously all updates were being filtered and split into PHP updates and JS updates. This moves the responsibility to the `PROGRAM` that is receiving the updates

Reviewed By: @bhosmer

Differential Revision: D1650488

Signature: t1:1650488:1414711460:bec8da02074fb5b2e17ce14cf667f224c559b72d
Support GCC/LLVM stack-smashing protection

Summary: Turn it on with `cmake -DENABLE_SSP=1` Protection buffer/stack overflow exploits.

Starting with version GCC 4.9 there is support for more advanced protection from overflows `-fstack-protector-strong` (minor loss of performance), the version below only support `-fstack-protector`.
LLVM 3.6 supports `-fstack-protector-strong` prior to this worked as a stripped-down option `-fstack-protector`.

This option protects the stack from overflowing/exploiting/debug and implementation process for laying.
RHEL, CentOS, Ubuntu uses these options to build all binary deb packages in the delivery.

This optional (default=disabled), need more testing.

More info:
- [RELRO: RELocation Read-Only](https://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/)
- [Improve your software security with GCC Stack Protector Strong](http://www.simonroses.com/2013/04/appsec-improve-your-software-security-with-gcc-stack-protector-strong/)
- [Hardening overflowing/exploiting/debug](https://wiki.debian.org/Hardening#Stack_
Closes https://github.com/facebook/hhvm/pull/4091

Reviewed By: @sgolemon

Differential Revision: D1646057

Signature: t1:1646057:1415053149:366a56d35c1298db8192bb291c55f183b4c2f95f
Adding check for creating function called __construct

Summary: The typechecker allowed creating a function called `__construct`
outside of class scope. This change disallows creating
a function with name `__construct`.

Reviewed By: @jwatzman

Differential Revision: D1648756
Delete (instead of free) Class::m_extra

Summary: It's allocated by new, so we should probably be symmetric.

Reviewed By: @mxw

Differential Revision: D1655737

Signature: t1:1655737:1415049149:c4ce71784fc9f6aed1a962f026a7d39c75a603ce
More fixes to kernel version pattern

Summary: Restrict the pattern to match the appropriate number of characters,
and assert that an acceptable number of fields are parsed.  Also split up the
test cases so it's easier to see which ones are failing.

Reviewed By: @markw65

Differential Revision: D1655782

Signature: t1:1655782:1415049423:1e1a6f665c1c8f129e48f9df120f7715f69034ca
Fix a use-after-free issue with TimeZone

Summary: I'm trying to debug a double free issue with
TimeZone. I don't think this is it, but in the case
of a race, GetTimeZoneInfoRaw would have returned
a raw pointer, right after freeing it. So there was
certainly a use-after-free issue here.

Reviewed By: @ottoni

Differential Revision: D1651248
More pretty printing fixup

Summary: Vasm code gen can generate blocks in the cold or frozen regions
even if the particular IR block is not hinted at being in either. The
pretty printed disassembly step at the end of code gen did not account
for this, so it would only print the code from the area that the IR
block originally though it was in. This diff fixes this issue by iterating all
of the areas for each IR instruction and dumping all of the code from any asm
range associated with that instruction.

Reviewed By: @jdelong

Differential Revision: D1655171
Support openssl replacements which don't export RAND_egd()

Summary: reSSL, for example, explicitly does not implement
RAND_egd() on the basis that:

"No software in 2014 should be using egd;
no software in 2014 should support using egd by accident."

Closes #4118

Reviewed By: @JoelMarcey

Differential Revision: D1656387

Signature: t1:1656387:1415077784:824f87d1b59db0bfd73a02f394a27baccd24cebd
Change default FCGI socket permission

Summary: Fixes #1727

Reviewed By: @JoelMarcey

Differential Revision: D1656743

Signature: t1:1656743:1415077740:3d6b88b33bd0c783f40ab9f6daee03e5b1f3cf68
typechecker: hhi for array builtin constants

Summary: ... as documented at:
 http://php.net/manual/en/array.constants.php

Reviewed By: @int3

Differential Revision: D1657551

Signature: t1:1657551:1415090689:ea6ccefcf07d6260c6cf949c5fe791b05386f677
Replace NEWOBJ macro with newobj<T> and newres<T> functions.

Summary: We already had to do different things for objects and resources,
and heap parsability will make them diverge further. This diff
makes them a) modern and b) easier to grep for.

ext_zip also had some bugs that this fixes.

Reviewed By: @jdelong

Differential Revision: D1655816
Enforce void return on native class constructors/destructors.

Summary: Also allow omitting return type for these methods
(implicit void).

Closes #4044

Reviewed By: @paulbiss

Differential Revision: D1657375

Signature: t1:1657375:1415082475:bca86e2593d6003d94be5ed5f3dbd442200d986d
Canonicalize path in CURLOPT_POSTFILEDS '@file/name' usage

Summary: The CURLOPT_POSTFIELDS option takes an
overloaded value which may be of the form:

"@/path/to/file;type=text/plain;filename=foo"

The existing implementation assumed all filenames were
absolute paths, and was thus breaking on relative uris.

Add a call to File::TranslatePath() to canonicalize these.

Also addressed a possible race-condition when modifying
a constant c_str() which may belong to a shared static string.

(Hopefully)
Closes #4098

Reviewed By: @JoelMarcey

Differential Revision: D1656226

Signature: t1:1656226:1415077931:4f2d849b4ef669414dd7943de37601db4ed05c85
Make sort()/ksort() mirror php5 in EnableZendSorting mode

Summary: Fixes #3545

Reviewed By: @ptarjan

Differential Revision: D1512943
Fix File::readCSV for crlf line termination

Summary: When we see a "\r" at the end of the buffer when reading a line in File we should read ahead further to see if it's part of a "\r\n".

Fixes #1658

Reviewed By: @sgolemon

Differential Revision: D1656908

Signature: t1:1656908:1415080300:9e9e054f4986057d311f716f89a6bffa3ed8eef6
Allow duplicate items in encoded urls

Summary: Fixes #3878

Reviewed By: @sgolemon

Differential Revision: D1633028

Signature: t1:1633028:1414515060:c5eec7b2d50f67a81098a929b8c191d40eb87f96
Convert ext/spl to HNI

Fixes #3947
This was a missing clone in the assignment.