Disable LowPtr when asan is enabled

Summary: ASan will not put things in low memory.

Reviewed By: @scannell

Differential Revision: D1322000
Remove assertion that became incorrect after changes in c_Map

Summary: c_GenMapWaitHandle was using low-level details about implementation of
c_Map (assert(m_iterPos) instead of assert(deps->iter_valid(m_iterPos)))
and this broke when implementation of c_Map has changed.

Let's remove that assertion since iter_value() on the next line
performs this assertion internally.

Reviewed By: @markw65

Differential Revision: D1329410
Tolerate multiple closure classes with the same name in hhbbc

Summary: There's some bug causing multiple closure classes with the
same name (and AttrUnique) to be in the repo.  Tolerate it for now
instead of asserting.

Reviewed By: @swtaarrs

Differential Revision: D1324898
Fix an imprecise case in union_of that could lead to index invariant violations

Summary: Unioning Obj and ?Obj=Foo would produce InitCell, which is a
bummer.  After a fix to WaitH<T> operator==, we infered a situation
better in www in a way that would cause it to infer less a precise
type on a later analysis round, and make an index type grow, which is
illegal.

Reviewed By: drussi

Subscribers: trunkagent, hphp-diffslists, ps

Differential Revision: D1329963
Revert "Revert "Fix a bug in Type::operator== for WaitH types""

Summary: Should work now.

Reviewed By: alexanderm

Subscribers: hphp-diffslists, ps

Differential Revision: D1329967
Fix a bug in resolve_func_fallback when there is no function to resolve

Summary: It was assuming either the fallback or non-fallback name
would resolve, and didn't test for an empty range.  It handled the
edge-case where the name is found in both places, but not the case
where it's found in neither.  (We were hitting this on a use of
"array_map" inside of a namespace, because hhbbc doesn't analyze
systemlib's hhas unit right now, so array_map doesn't resolve.  The
path that resolves it outside of a namespace works correctly.)

Reviewed By: @scannell

Differential Revision: D1324431
Revert "Fix for setting multiple cookies with the same name and added max-age support"

Summary: This reverts commit c7633eeb9ff29709db00134666e7f2ed5b16fff1.

Reviewed By: bertrand, eletuchy

Subscribers: ypisetsky, trunkagent, hphp-diffslists, ps

Differential Revision: D1335737

Conflicts:
	hphp/runtime/server/transport.cpp
Fix Xenon crash

Summary: When WaitableWaitHandle::getdependencystack is called, there
could be async functions on the stack which are in the middle of returning.
In particular, their $this might have been destroyed, and then we have
started executing a local variable's __destruct, which then ends up
calling WaitableWaitHandle::getdependencystack (possibly through many
levels of calls).

This typically happens due to Xenon being called from onFunctionEnter,
or onFunctionExit. There was a previous attempt to fix these crashes
by nulling out $this in the ActRec passed to onFunctionExit; but as
described above (and as happens in the new test case), there's no
guarantee that the problem is happening in the top frame.

Reviewed By: drussi

Subscribers: hphp-diffslists, jan, ps, bill

Differential Revision: D1336321

Tasks: 4352949
Fix memory leak with xml errors

Summary: When resetting the vector of errors we call clear() which does not have to relase memory, just reset the count

Reviewed By: mwilliams

Subscribers: trunkagent, hphp-diffslists, ps, marccelani, jmarch

Differential Revision: D1336283
Fix crash due to hash collisions in POST data

Summary: Too many hash collisions in the POST data resulted in
a warnUnbalanced fatal, which was only caught by the "last resort"
catch in HttpRequestHandler::handleRequest.

This revealed a few bugs: sourceRootInfo and reqURI both contain
smart allocated Strings, but their destructors run after
hphp_session_exit() has destroyed the memory manager. Its not
clear to me why this isn't a problem when we don't fatal, but
I fixed it by splitting handleRequest to ensure the
destructors are called earlier.

This still left us with a problem where we didn't correctly
close the connection, so I fixed that too.

Reviewed By: drussi

Subscribers: otto, trunkagent, hphp-diffslists, ps

Differential Revision: D1336737

Tasks: 4148205
Changelog for 3.1.
bump version to 3.1.0