codemod: merge folly/wangle and folly/experimental/wangle

Summary: Various TARGETS could definitely use some rearranging but I'd rather wait until we're cut over to the new repo

Reviewed By: @djwatson

Differential Revision: D1740858
Allow user to wait forever for server initialization

Reviewed By: @elgenie

Differential Revision: D1746433

Signature: t1:1746433:1418934482:d386ea7f8dbf44f33d99b4c94816605b1427c541
Update third-party hash from lz4, pcre and timelib (license) updates

Summary: 3 pull request updates for third-party integrated now.

Reviewed By: @paulbiss

Differential Revision: D1748723

Signature: t1:1748723:1418933268:286afa61c6d01a3d78e62aff40ac1d4849efd435
Folly OSS was updated. We need to update the third-party has again

Summary: This will make the HHVM OSS build successfully again

Reviewed By: @paulbiss

Differential Revision: D1749071

Signature: t1:1749071:1418936287:056bafbfbc3ed3d9f49025060ce854d2ff6cee7d
Fix some lowptr llvm issues

Summary: Certain pointers are 4 bytes in memory but we still want them to be 8
bytes in registers, so we need to insert some trunc/zext instructions. This
shouldn't affect generated code in the x64 backend.

Reviewed By: @jasone

Differential Revision: D1748163

Signature: t1:1748163:1418924796:be359657303428999a73e1911ea060f439663a50
Fix DecodedInstruction's handling of VEX/XOP prefixes

Summary: A 2 byte VEX prefix implies that m_map_select should be set to 1. I
also added back support for decoding XOP prefixes, with a check to make sure
it's not just an 0x8f one-byte opcode. This allows us to tell LLVM to emit code
for the current CPU without tripping up the decoding we need to do after LLVM
codegen.

Reviewed By: @markw65

Differential Revision: D1748309

Signature: t1:1748309:1418919894:121ed5c97e54b74d9799712ef56efbb4fdd653ca
fixed decoding utf8 strings so they correctly return '?' on invalid sequences

Summary: fixed utf8 decode function so it will it will correctly handle invalid byte sequences. For example, the the old decoder allowed the non shortest form of a character to be decoded, which allows for a number of malicous attacks. Fixes #4442428, which is CVE-2010-3870 (Invalid UTF-8 passed to utf8_decode results in unexpected output)

Reviewed By: @ptarjan

Differential Revision: D1488851
reorder shm_put_var operations

Summary: Reordering the shm_put_var operation to serialize the object before
writing to memory aviods a segfault and possible arbitrary memory write.
Previously the shared memory location was found before the object was
serialized and it is possible to detach the shm location during serialization.
This would have shm_put_data write to memory using a shm handle that doesn't
exist.

CVE-2010-1861

Reviewed By: @markw65

Differential Revision: D1694899
Fix the build flag gating for crc32 hashing

Summary: There was no way to actually turn it off.

Reviewed By: @markw65

Differential Revision: D1748799
Only pass the -DDEBUG option to g++ in Debug builds

Summary: This makes it so that only builds with CMAKE_BUILD_TYPE=Debug will
turn the "DEBUG" macro on, whereas previously all build types except
'Release' got the DEBUG macro. This enables proper use of the
'RelWithDebInfo' build type, which shouldn't define the DEBUG macro.
Closes https://github.com/facebook/hhvm/pull/4474

Reviewed By: @paulbiss

Differential Revision: D1746222

Signature: t1:1746222:1418945055:b0cb92e5256e59233c43ace6a41cefcbd1fd9f8d
Size buffers correctly in ext_mb

Summary: The existing code appears to have assumed that pointers are int-sized.

Reviewed By: @JoelMarcey

Differential Revision: D1749015

Signature: t1:1749015:1418949161:5cbae03fce85c5cf1d000d9e9e1201b98a48fc30
Fixes for big folly push that broke stuff, incorporates thrift and proxygen updates too

Summary: I think this gets us to a good build state

Reviewed By: @sgolemon

Differential Revision: D1749817

Signature: t1:1749817:1418948113:eb63d62c86b0290172f09b727dce355370660165
Fix some leaks in new_socket_connect

Summary: We were leaking Socket pointers and file descriptors in some places, add a
close() and use unique_ptrs to keep track of Socket objects.

{sync, type="child", parent="internal", parentrevid="1748595", parentrevfbid="492617220877972", parentdiffid="5992396"}

Reviewed By: @markw65

Differential Revision: D1748595

Signature: t1:1748595:1418950703:633a8bafba7ed8181758bf35c4b64be369b9d433