Fix twital re-record - test find mode bad

Summary: refs facebook/hhvm#3381

Reviewed By: @JoelMarcey

Differential Revision: D1481847
unflakey md5 and sha1 test

Summary: failed on D1479623?vs=on&id=4750825&whitespace=ignore-all#toc

Reviewed By: @fredemmott

Differential Revision: D1482115
Lint fixes for man page

Summary: See rrh code review: https://github.com/facebook/hhvm/commit/e32f5bf0cc7a74d671c6922108c68bfbdfdbe1f4

Thanks rrh

Reviewed By: @fredemmott

Differential Revision: D1481918
Return false in fscanf if the file is empty

Summary: This will fix #3352.
Closes https://github.com/facebook/hhvm/pull/3364

Reviewed By: @LiraNuna

Differential Revision: D1478505

Pulled By: svcscm
hphp: placate newer clang regarding non-local lambda expressions

Summary: * hphp/hhbbc/test/type-system.cpp: Several non-local lambda
expressions needlessly used [&] ("capture-default").  Remove
the "&".  Here's a sample diagnostic:
  hphp/hhbbc/test/type-system.cpp:169:44: error: non-local lambda\
    expression cannot have a capture-default
  auto const test_empty_array = folly::lazy([&] {

For reference, here's the relevant part of the standard:
  C++11 [expr.prim.lambda]p9:
    A lambda-expression whose smallest enclosing scope is a block scope
    is a local lambda expression; any other lambda expression shall not
    have a capture-default or simple-capture in its lambda-introducer.

Reviewed By: @alexmalyshev

Differential Revision: D1482394
Don't #include libelf on OS X

Summary: We don't need libelf includes on OS X here; we have our own
implementation on Mach-O. Actually including the headers is annoying --
for compatibility reasons, OS X package managers to build libelf in
"disable compat" mode, which doesn't install these headers in
/usr/include, so you need to do `-I/foo/bar/libelf` -- but `libelf.h`
itself does a `#include <libelf/libelf.h>` so you //also// need
`-I/foo/bar` if `/foo/bar` isn't a standard include directory (again
common on OS X).

But this whole thing should be moot, we don't need it, just move it
under ifdef.

Reviewed By: @ptarjan

Differential Revision: D1482087
Kill JmpFlagBothPaths flag

Summary: Instead, just check if a block exists for that offset.
Also, clean up some stuff that became unnecessary.

Reviewed By: @swtaarrs

Differential Revision: D1478708
Fix bug in cgLoad

Summary: If the type is a subtype of Null, we early-exit. We already
detect the dead-load situation, and type of {InitNull|Uninit}
should go down the cgLoadTypedValue case, which should correctly
load.

Now that I look more closely I don't think this is a bug,
but the code was misleading.

Reviewed By: @swtaarrs

Differential Revision: D1478816
Rename JmpFlagBreakTracelet to JmpFlagEndsRegion

Summary: That's it.

Reviewed By: @alexmalyshev

Differential Revision: D1482019
Remove unnecessary abstraction from fastcgi server

Summary: I did this while trying to make sense of the current setup. The
ProtocolSession class didn't appear to serve any purpose so it's been collapsed
into the only subclass. I've also added brief descriptions of most classes
describing their role in the server, and made a few other cleanup tweaks.

Reviewed By: @ptarjan

Differential Revision: D1476104
Properly shut down fastcgi worker threads when connection is closed

Summary: If the fastcgi connection from the webserver was closed while a
request was reading its POST data, the worker thread processing that request
would get stuck indefinitely waiting for the rest of the data to arrive. Given
enough time, all worker threads in the server could get stuck, causing the
server to become completely unresponsive until a restart. Make sure we notify
the appropriate condition variable to avoid this.

Reviewed By: @ptarjan

Differential Revision: D1476306