Print vasm next to LLVM IR.

Summary: When 'llvm' trace level is set to 5 and above we print corresponding vasm instructions next to LLVM IR.

Reviewed By: @swtaarrs

Differential Revision: D1701264

Signature: t1:1701264:1416872125:08e8b99b4d9f5012db02e308b98f4808d231cc70
Generate new_delete linker command programmatically

Summary: ASAN doesn't like redefining new/delete, probably because it wants
distinct symbols for the purpose of matching up new/delete vs malloc/free.  The
workaround here is to generate the new_delete linker file programmatically and
make it conditional on FOLLY_SANITIZE_ADDRESS.

Reviewed By: @markw65

Differential Revision: D1711991
typo fixes - https://github.com/vlajos/misspell_fixer

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

Reviewed By: @JoelMarcey

Differential Revision: D1669150

Signature: t1:1669150:1417546223:9a41563560056b4ee139dcfb9ec993ba171bfe2f

Pulled By: @fredemmott
Add support for reverse proxying

Summary: Augment the VirtualHost redirect code so that -1 means
reverse proxy, and implement support for it in RequestURI

Reviewed By: @afrind

Differential Revision: D1711599
Avoid overwriting string memory in the PDO::mysql driver

Summary: std::strcpy() attempts to overwrite `host` which
at that point is pointing to either user-supplied data,
or worse read-only options memory if `host` hasn't been set.

Make a copy for use within the function.

Closes #4254

Reviewed By: @fredemmott

Differential Revision: D1684162

Signature: t1:1684162:1417460400:48a508bf76edb65de5de58ee8981bb6d507d50a4
Move generate_XXX_exception from builtin-functions to thread-info

Summary: These are only used in thread-info.cpp so we can move them there and
make them static.  They're easier to find this way too (I can never remember
they're in builtin-functions since it seems pretty random).

Reviewed By: @jdelong

Differential Revision: D1712143

Signature: t1:1712143:1417493459:9f9dbcecc155fc45e16fff3d63f5646068ab4cbc
touch_variation1 is flaky

Summary: Both it and touch use dirname(__FILE__)."/touch.dat", so they can't be
run concurrently.

Reviewed By: @fredemmott

Differential Revision: D1712418

Signature: t1:1712418:1417546066:e938a29484398ce85cbf5956eacdebfa6210a9ee
Revert work around for gcc compilation issue

Summary: Revert part of commit a7c76ea. The assertion inside bufferSize() failed.

Fixes guzzle test run failure.
Closes https://github.com/facebook/hhvm/pull/4327

Reviewed By: @fredemmott

Differential Revision: D1701516

Signature: t1:1701516:1417556817:2b2668faccb44935edd11a0d2652b7019c457b22
Global event loop for asio socket events

Summary: Basic folly::EventBase running in a separate thread
for use by awaitables which need to wait on socket events.

See curl_multi_await() for an example usage.

Reviewed By: @markw65

Differential Revision: D1700900

Signature: t1:1700900:1417561060:43a58182b0342f8b630c2de7faada4bbb0bda484
Implement curl_multi_await()

Summary: Push curl sockets into s_asio_event_base loop
along with optional timeout.  Trigger awaitable completion
on any handle activity.

Reviewed By: @JoelMarcey

Differential Revision: D1700978

Signature: t1:1700978:1417563769:046272e19366f80a118c552ce64c7cff7573da4d
Sanitize inputs to strftime

Summary: strftime can read arbitrary memory. We sanitize the inputs before
calling strftime and throw an invalid arguement exception when they are out of
range.

Reviewed By: @JoelMarcey

Differential Revision: D1709836
Refactor Profiler::Frame so subclasses of Profiler can have their own Fr...

Summary: ...ame.

Change allocation/deallocation of Profiler::Frame to use new/delete.
Add a virtual destructor to Profiler::Frame.
Fiddle with ASCII art.
Closes https://github.com/facebook/hhvm/pull/4305

Reviewed By: @bertmaher

Differential Revision: D1697375

Signature: t1:1697375:1417580772:001c934cd4a863cdcbe418a580faf3521222b801
Fix build with boost 1.49

Summary: Debian Wheezy (and a couple other platforms) have this even
more ancient version of boost, which doesn't have
`error_with_option_name`. Adjust the ifdef.

Reviewed By: @JoelMarcey

Differential Revision: D1714258

Signature: t1:1714258:1417565551:b9ec04add2eb0a0ab8a39318cc35d18b990c27aa
Use a different HeaderKind for big malloc vs size-tracked objects

Summary: They both need a BigNode, however size-tracked allocations also
include their own headers. We need to tell them apart in order
to do anything with the payload, other than skip over it. For
example, a large object looks like this in memory:

  [BigNode][ObjectData][props...]

Reviewed By: @bertmaher

Differential Revision: D1711525

Signature: t1:1711525:1417544209:5a88f64c7ac53ed2b9c0abb2673c6020350f03f1
static_assert size of BuiltinFile matches PlainFile

Summary: since it inherits heapSize(), it better be the right answer.

Reviewed By: @markw65

Differential Revision: D1714352

Signature: t1:1714352:1417568641:7ded3a5e3a399e38eefa533f4e74a2a57cfb9041
use newobj to allocate c_Vector and c_Map

Summary: copypasta mistake

Reviewed By: @mxw

Differential Revision: D1714116

Signature: t1:1714116:1417618073:586d443cdf6435a1ecd096743d393721b91b963a
Smarter path checking in out2expectf

Summary: The old method assumed that file paths would contain /hphp, and
stripped everything from the leading / to the hphp. Some tests end up
with the path to the repo in them, which probably doesn't contain hphp,
or might contain things like hphp-1, hphp-2 etc. In either case,
out2expectf produces expectf files that work locally, but probably not
anywhere else.

This finds the path to the root of the repo, and strips it explicitly,
along with a /hphp if its there, replacing the whole lot with %s.

Reviewed By: @swtaarrs

Differential Revision: D1713663

Signature: t1:1713663:1417626839:d95ef223421ebd9ec6cb0ddd70ef19421f772c62
Better implementation of DOMPropertyAccessorMap

Summary: Base the property order on the input table, use a set instead of
a map, and get rid of the duplicate map.

Reviewed By: @bertmaher

Differential Revision: D1712866

Signature: t1:1712866:1417547052:aca10c82ce8595f72c4aff549630163e0872b6bf
Fix #2517,Add pid support for persistent connection in Redis

Summary: pfsockopen does not supports id. So I changed it stream_socket_client, to handles ids as well.
Closes https://github.com/facebook/hhvm/pull/4291

Reviewed By: @fredemmott

Differential Revision: D1693997

Signature: t1:1693997:1417632135:c2b2b2648ee77d911d00e1da801c8698e591c784
Use LLVM's experimental location records.

Summary: Replace the usage of LLVM's stackmaps with locrecs as locrecs require
less help from HHVM disassembler and do not prevent any
of LLVM optimizations.

Reviewed By: @swtaarrs

Differential Revision: D1711966