Fix error message and returnvalue in fread

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

Reviewed By: svcscm

Differential Revision: D1483009

Pulled By: @fredemmott
Decrease timeout for framework installation commands

Summary: There's a higher level timeout of 300 somewhere. Set to 1 minute less at 240. We successfuly skip if this timeout is hit, but don't if the whole process gets killed

Reviewed By: @ptarjan

Differential Revision: D1498591
Makes HHVM recognize <<Memoize>> and generates a new param and changes the function name

Summary: This is the first part of making a <<Memoize>> attribute.
Specifically, this recognizes the attribute on a method, generates a param to hold the result, and changes the name of the underlying funciton.
It currently throws an error so people don't accidentally stumble upon it. The next step will be to make this work for methods with zero args

The admarket test failure was not possibly related to this

Reviewed By: @ptarjan

Differential Revision: D1490770
Makes <<__Memoize>> work for zero-arg methods

Summary: As the test shows, this works for normal methods, async methods, and overridden methods. It should just take a few tweaks to make it work for static methods. I'll do that in the next diff

As @jano said, these failures are clearly unrelated.

Reviewed By: @jano

Differential Revision: D1496765
Temp fix for cygwin linking

Summary: This is the quick and dirty version of dealing with no __register_frame with windows SEH frame unwind handling
this will be replaced with rtladdfunctiontable when that is ready to go

This allows cygwin to build and link

Reviewed By: @edwinsmith

Differential Revision: D1500365
added new raise_error family functions that skip the top frame of the backtrace.

Summary: There were not functions for raising errors skipping the top frame of the backtrace. Ideally, I would have made this an optional argument to the existing functions, however, the current functions are overloaded with formatting strings and thus that is not simple. This is useful for functions raising errors from systemlib code as otherwise the top frame of the stack will not contain file and line information. See D1486927

Reviewed By: @ptarjan

Differential Revision: D1488146
Updating Xenon to use :: always

Summary: Sometimes it generates -> and sometimes ::, based on how the data was
logged when created.  This will make it consistent.

Reviewed By: @jano

Differential Revision: D1499577
Added support for calling non user errors from systemlib code. This also fixes the lack of file and line info in systemlib trigger_errors

Summary: Added checks for trigger_error that allow the use of E_<USER/WARNING/...> from systemlib functions. This also happens to fix file and line information for some of the warnings raised by systemlib functions. Depends on D1488146

Reviewed By: @ptarjan

Differential Revision: D1486927
ArrayObject::append() should delegate to ArrayObject::offsetSet()

Summary: Match php5 implementation by delegating rather than direct manipulation of internal state.
Fixes issue #3403.
Closes https://github.com/facebook/hhvm/pull/3404

Reviewed By: @fredemmott

Differential Revision: D1486300

Pulled By: svcscm
Change Facebook proxy information for HHVM OSS test runner

Summary: Facebook: https://fb.facebook.com/groups/pe/permalink/815638725137542/

Reviewed By: @JoelMarcey

Differential Revision: D1500568
DirectoryIterator::seek from beginning not current position

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

Reviewed By: @fredemmott

Differential Revision: D1484789

Pulled By: svcscm
Change hhvm_wrapper to only make hhvm read /usr/local/hphpi/cli.hdf if i...

Summary: ...t exists, eg within FB.
Closes https://github.com/facebook/hhvm/pull/3405

Reviewed By: @fredemmott

Differential Revision: D1487055

Pulled By: svcscm
Fix thread stack limits on base thread in cygwin

Summary: Because of the nature of the pthreads layer, the attr passed to pthread_attr_getstack MUST be the one passed through pthread_create OR it needs to be fetched with the gnu extension pthread_getattr_np

Reviewed By: @JoelMarcey

Differential Revision: D1501623
typechecker: class_meth can use self::class and static::class

Summary: Referring to self::class and static::class is unambiguous in the
 context of `class_meth`. `self::class` is equivalent to the behavior
 with `__CLASS__`, whereas `static::class` is new functionality that
 allows `class_meth` to support dispatch to late-bound static methods.

Reviewed By: @jwatzman

Differential Revision: D1500010
typechecker: detect abstract parent:: calls

Summary: `parent::foo()` invokes a specific method and not a
 late-bound one; it's thus non-sensical for that method to be
 `abstract`.

Reviewed By: @jwatzman

Differential Revision: D1500136
Also move .skipif files and test against repo mode

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

Reviewed By: @fredemmott

Differential Revision: D1496026

Pulled By: svcscm
Extended and further refactored debug hooks to abstract hphpd features

Summary: This diff is necessary to implement breakpoints and flow control for xdebug.
It is again a large diff, so I apologize for that, but I did split this up
from the next two diffs I am going to send out.

Before, setting breakpoints was possible through the debug hooks, but they
were extremely limited- you could only provide offsets. hphpd implements
a ton of logic in order to implement its different types of exceptions within
this framework. The most difficult type is the line breakpoint as lines span
multiple opcodes and we only want to break on them once.

Now, function entry, function exit, and line breakpoints can be added directly
through `phpAddBreakPointFuncEntry`, `phpAddBreakPointFuncExit`, and
`phpAddBreakPointLine`. The implementation of line breakpoints, though much
simplified, follows the same approach as hphpd.

Ultimately hphpd's breakpoints could be refactored to use this approach, but
for now I've just exposed the approach for other debuggers (namely xdebug) as
I don't think refactoring hphpd would be the best use of time right now.

Reviewed By: @alexmalyshev

Differential Revision: D1494622
Fix too many arguments error to match PHP

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

Reviewed By: @ptarjan

Differential Revision: D1500290

Pulled By: svcscm
don't statically link libgcc/libstdc++ by default on OSX

Summary: A previous commit, 552b409dbc71cc9e8a0487fbd6e915f9d7330598, caused us
to always statically link for the sake of portability. However, there
currently exists a bug in (homebrew?) gcc which is causing exceptions
thrown by the application to call abort instead of properly unwinding
and allowing the exception to be caught. An example can be found here:
https://bugs.busybox.net/show_bug.cgi?id=7208

HHVM uses throw/catch in Repo::schemaExists to determine if a table
exists. This caused a runtime crash on OSX.

Ideally we'll be moving to clang on OSX in the near future anyway, but
if, for whatever reason, we want to use gcc *and* statically link at
some point, we can use the recently added cmake option STATIC_CXX_LIB
to do so.
Closes https://github.com/facebook/hhvm/pull/3480

Reviewed By: @JoelMarcey

Differential Revision: D1500299

Pulled By: @sgolemon
Fix information leak in hash_equals() implementation

Summary: Existing code had branches which could potentially be
exploited to determine $known_len.  Stick to always
doing the same work regardless of $known_len.

Note that this depends on the compilation of this:

  if (ki < known_limit) {
    ++ki;
  }

Turning into:

  CMP (ki), (known_limit)
  ADC (ki), 0

Since our BC->IR->ASM loop doesn't do that,
I moved it back to C++ where we get better
compilation.

Reviewed By: @apage43

Differential Revision: D1490528