Always populate m_constraints.typeSrcs for LdLocs added by insertLocalPhis

Summary: It wasn't adding an entry into the m_constraints.typeSrcs map when the
set was empty.

Also, dump the unit in IRBuilder::constrainValue if
m_constraints.typeSrcs doesn't have an entry for an instruction.

Reviewed By: @bertmaher

Differential Revision: D1559672
stop breaking ubuntu 10.04

Summary: A partial revert of https://github.com/facebook/hhvm/pull/3591 . I used `FindLibZip.cmake` as a template. I think for system defined libraries the old code was good enough, but if the thing is only installed in the CMAKE_INCLUDE_PATH then the macro@​radford was using won't work.

Reviewed By: @JoelMarcey

Differential Revision: D1560119
Admin command to forcibly madvise away APC prime file data

Summary: I think that perflab's RSS stats aren't very meaningful because we
have the APC prime file still in memory.  With this admin command we can get
rid of it, hopefully, at the right point in the pipeline to fix RSS
measurements without perturbing perf.

Reviewed By: @jdelong

Differential Revision: D1560265
Revert "Custom path to the installed folder"

Summary: I'm torn on this so want to use this for discussion. Should the INSTALL_PATH namespace where we get `/etc/hhvm/php.ini` from? I'm assuming it was added for someone on those other systems, but I do know that on apple things are read from `/etc` without namespacing to `/usr/local` so I'm assuming the rest of that is wrong. Thoughts?

Fixes https://github.com/hhvm/packaging/issues/71

Reviewed By: @paulbiss

Differential Revision: D1560037
Fixed ReflectionMethod debug info not compatible with PHP

Summary: Closes https://github.com/facebook/hhvm/pull/3458

Reviewed By: @ptarjan

Differential Revision: D1495043
Remove remaining internet dependencies for test runner

Summary: Requires use of the --cache-dir option

Reviewed By: @JoelMarcey

Differential Revision: D1560918
Fix segfault when calling hash_final twice

Summary: context is freed in hash_final. The second call tries to use the freed variable.

Fixes #3741
Closes https://github.com/facebook/hhvm/pull/3771

Reviewed By: @fredemmott

Differential Revision: D1560874
Fix spelling errors in comments.

Summary: Spelling errors are hard to ignore...

Reviewed By: @jwatzman, @elgenie

Differential Revision: D1560046
Remove Toran Proxy support

Summary: We're not using it, as it doesn't cache enough to improve our reliablity. Replaced with --cache-dir.

Reviewed By: @JoelMarcey

Differential Revision: D1561742
Make Framework::installDependencies() final, add <<Override>> where appropriate

Summary: The new hooks mean there's no need to override installDependencies(), and implementing the hook makes it clearer what's going on.

Add <<Override>> to isInstalled just for future safety.

Reviewed By: @JoelMarcey

Differential Revision: D1561812
Reserve / fix error codes.

Summary: Reserve error codes for an upcoming commit.

Also fix one instance of overlapping error codes.

Reviewed By: @elgenie

Differential Revision: D1563423
Tune pcre cache lookup

Summary: In the AHM for pcre cache, optimistically check for
StringData pointer equality before doing a full
comparison.

Reviewed By: @edwinsmith

Differential Revision: D1557919
Clean up const type inference

Summary: Remove duplicated code dealing with infering the type of constants. For
some reason it was doing munging during naming, which we don't need at
all; move the one relevant bit into the other code in declaration. Add a
comment as to why we need special logic here.

Originally to support negative constants:
These are parsed as a unary minus. Fixing here seemed easier
than fixing the parser (which isn't necessarily wrong depending on how
you look at it).

Reviewed By: @int3, @elgenie

Differential Revision: D1559026
Added a rule to the simplifier for LdCtx to constant fold when inlined

Summary: When compiling LateBoundCls, we emit a LdCtx followed by a LdClsCtx to
get the Class that we're operating on. When LateBoundCls is inlined in such a
way where we statically know which Class the callee was invoked with, we can
constant fold the LdCtx and LdClsCtx, which then allows us to DCE the
DefInlineFP and other associated boilerplate for reifying an inline call frame.

Reviewed By: @jdelong

Differential Revision: D1552775
Minor fixes to PHP5 test importer

Summary: * Exclude buggy test ext/gmp/tests/014.phpt
* Use __DIR__ instead of getcwd() in tests/security/open_basedir.inc
* Deal with having false passed to utf8Sanitize()
* Add more "other files"

Prep for PHP-5.6.0 test import

Reviewed By: @fredemmott

Differential Revision: D1556259
hh_ide.js - remove unneeded declare_file call

Summary: caller needs to hh_add_file before they can call hh_check anyways, so declare file has already been called.

Reviewed By: @jwatzman

Differential Revision: D1562022
hh_ide.js perf - Don't parse if the parser_heap would already have it

Summary: We're doing this completely unnecessarily. If it's already in the parserheap, we don't need to parse it again.

Reviewed By: @jwatzman

Differential Revision: D1562087
Removed REX.W requirement for several instructions

Summary: Several SSE related instructions didn't require REX.W, but we were
generating them anyways. Now we don't generate a REX prefix if if these
instructions use xmm0-xmm7. If they do use xmm8-xmm15, we emit the REX prefix
byte with REX.R set (which we already did correctly).

Reviewed By: @edwinsmith

Differential Revision: D1548397
Fix potential security leak in HashContext

Summary: CVE-2014-6229

This is not a NUL-terminated string, it's a fixed-size block of data.
The risks were key truncation (if there happens to be a NUL byte in the
key) or over-reading (which would be information leakage).

Reviewed By: @ptarjan

Differential Revision: D1533546
Remove the streams extension (just the stub)

Summary: The "stream extension" is actually a subset of the standard extension.

Reviewed By: @fredemmott

Differential Revision: D1561554