Permalink
Switch branches/tags
Nothing to show
Commits on Apr 19, 2011
Commits on Apr 18, 2011
  1. [Perf] add ThreadLocalNoCheck class

    myang committed with scottmac Apr 14, 2011
    Summary:
    This is mostly cleanup work. I added a new ThreadLocalNoCheck class which
    serves a easier way to do getNoCheck instead of get. Along the way I found
    some small optimizations so I included them. The main changes are
    (1) new macros DECLARE_THREAD_LOCAL_NO_CHECK/IMPLEMENT_THREAD_LOCAL_NO_CHECK
    which uses the new ThreadLocalNoCheck class
    (2) renamed reset() to destroy() to parallel better with create(). This is
    because that's really what reset() is doing. The name reset would suggest
    reusing the memory and do another placement.
    (3) removed reset() also from RequestLocal class since they are not used.
    (4) I noticed that the compiled code was paying some cost using
    RequestEvalState to find class info even though interpreter isn't in the
    picture. I made a change to generate has_eval_support to avoid that.
    (5) I picked a number of frequently used ThreadLocals and changed them
    to ThreadLocalNoCheck
    (6) I inlined the ObjectData() constructor since using getNoCheck() this
    actually resulted both smaller code size and fewer instructions executed
    for the constructor
    (7) Removed a number of onThreadExit which does g_context.reset() because
    they are no longer needed and the g_context.destroy in the fini_thread_locals()
    takes care of them.
    (8) Renamed ThreadLocalNoCheck::get() to getCheck(). Tagged those wrapper
    functions that call getCheck() with ATTRIBUTE_COLD because they are essentially
    called one time only per thread.
    (9) Renamed s_rpc_request_handler to s_xbox_request_handler in xbox_server.cpp
    because semantically it is a xbox request handler implemented as a
    RPCRequestHandler.
    
    Task ID: #
    
    Blame Rev:
    Reviewers:
    qigao, qixin, mwilliams
    
    CC:
    hphp-diffs@lists
    
    Micro benchmark showed about 15.7% speed up in the extreme case
    <?php
    class A {}
    function foo() {
      for ($i = 0; $i < 500000000; $i++) {
        $r = new A;
      }
      return $r;
    }
    var_dump(foo());
    
    Before the change
    [myang@dev1560] time ./program
    object(A)#500000000 (0) {
    }
    
    real    0m17.952s
    user    0m17.919s
    sys     0m0.032s
    
    After the change
    [myang@dev1560] time ./program
    object(A)#500000000 (0) {
    }
    
    real    0m15.130s
    user    0m15.100s
    sys     0m0.032s
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 238046
  2. IPv6 support

    Paul Saab committed with scottmac Apr 14, 2011
    Summary:
    When calling getaddrinfo to bind & listen on INADDR_ANY,
    0.0.0.0 should not be used if IPv6 support is asked for.  Pass NULL in
    to evhttp_bind_socket_backlog_fd for the address to bind to which will
    allow getaddrinfo to return an AF_INET6 address if the host supports it.
    
    Changes to libevent are needed to support AF_INET6 sockets which is
    coming in a separate diff.
    
    Task ID: #
    
    Reviewed By: qigao
    Reviewers: qigao
    CC: macvicar, ps, hphp-diffs@lists, qigao
    Revert Plan:
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 237856
  3. [Fix] Fix libcore build failure

    myang committed with scottmac Apr 14, 2011
    Summary:
    There are a few places where NEWOBJ should be used instead of NEW. The libcore
    build failed because of this.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    qigao, qixin
    CC: je
    
    Test Plan:
    make fast_tests
    make slow_tests
    make libffi
    make www
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 237584
  4. [Fix] Fix slow test failure

    myang committed with scottmac Apr 13, 2011
    Summary:
    The TestHint in the slow test could pass when running alone but would fail
    as part of the entire suite. I found that the GetTypeHintTypes will populate
    the TypeHintTypes map just once when first time referenced and it is empty.
    This won't work in case of doing slow test since when
    Option::EnableHipHopSyntax is set, the TypeHintTypes wouldn't be empty so
    the rest of the types are not set in the map, causing the compiler to believe
    that 'int' is an object type name.
    
    I added a new function ResetTypeHintTypes and call it before running each
    individual test.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    qigao, mwilliams
    CC:
    
    Test Plan:
    make fast_tests
    make slow_tests
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 237320
  5. [Fix] raise error on function return type hint

    myang committed with scottmac Apr 13, 2011
    Summary:
    <?php
    s
    function hi() {}
    
    PHP reports syntax error but hphpi silently ignored the word 's' and assume
    it is a return type hint. But we don't do anything yet for return type hint.
    I made a change to raise error in such a case, until we plan to support
    return type hint.
    Task ID: # 499816
    
    Blame Rev:
    
    Reviewers:
    mwilliams, qigao, hzhao
    CC:
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 236878
  6. Update debugger extension method signatures

    andrewparoski committed with scottmac Apr 12, 2011
    Summary:
    Several debugger extension methods had signatures that were using
    p_DebuggerCommand (which is a macro for Object) instead of using CObjRef.
    This diff fixes these method signatures to be consistent with the rest of
    the extension methods.
    
    Task ID: #
    
    Test Plan:
    make fast_tests
    make slow_tests
    
    Reviewed By: je
    Reviewers: je
    CC: ps, je
    Revert Plan:
    Tags: hphp
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 236530
  7. [Fix] Correct dependency for building libhphp_java.so

    qixin committed with scottmac Apr 12, 2011
    Summary:
    The java .so is built from PIC_OBJECTS now, so the dependency should be from
    PIC_OBJECTS. Otherwise, we might compile the .cpp file before generating the .h
    file.
    
    Quite a few libcore build failures seemed to be due to this problem.
    
    Task ID: #
    
    Test Plan:
    make -C ffi/java
    
    Reviewed By: mwilliams
    Reviewers: mwilliams
    CC: ps, mwilliams
    Revert Plan:
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 236510
  8. Update soap extension method signatures

    andrewparoski committed with scottmac Apr 11, 2011
    Summary:
    Several soap extension methods had signatures that were using String, Array,
    and Variant instead of CStrRef, CArrRef, and CVarRef. This diff fixes these
    method signatures to be consistent with the rest of the extension methods.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers: mwilliams
    
    CC:
    
    Test Plan:
    make fast_tests
    make slow_tests
    
    Revert Plan:
    
    Tags: hphp
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 236275
Commits on Apr 12, 2011
  1. [PHP53] Add E_USER_DEPRECATED / E_DEPRECATED constants

    scottmac committed Apr 11, 2011
    Summary:
    Some new constants for use in PHP 5.3 when you plan to remove some code in the
    future.
    
    Task ID: #
    
    Test Plan:
    
    <?php
    
    trigger_error('test test', E_USER_DEPRECATED);
    
    ?>
    
    Reviewed By: mwilliams
    Reviewers: andrewparoski, mwilliams, myang
    CC: mwilliams
    Revert Plan:
    Ok
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235998
  2. [Fix] Fix hphpi(hphpd) crash when eval a closure

    myang committed with scottmac Apr 12, 2011
    Summary:
    When using a closure in the debugger, it caused crash
    hphpd> =print_r(array_map(function($a) { return $a;}, array(1, 2, 3, 4)));
    Core dumped: Segmentation fault
    
    The issue is that we need a EvalFrameInjection instead of a plain
    FrameInjection in order to pass the closure object. In this case the debugger
    created a plain FrameInjection for psuedo main which won't work, causing
    an assertion to fail when compiled under debug mode and crash in no-debug
    mode. I made the change to create a EvalFrameInjection and associated it
    with the environment.
    I also fixed a read-beyond-buffer when the name of the debugger pseudo main
    is just "_".
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    mwilliams, qigao, hzhao
    CC:
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235980
  3. [PHP53] Add __DIR__ constant

    scottmac committed Apr 11, 2011
    Summary:
    __DIR__ is just f_dirname(__FILE__) but done at compiletime
    instead of runtime.
    
    It was originally designed to replace lots of
    
    require_once dirname(__FILE__) . '/blah.php';
    
    Added it into the parser, eval and compiler.
    
    Task ID: #
    
    Reviewed By: mwilliams
    Reviewers: mwilliams, myang
    CC: mwilliams
    Revert Plan:
    Ok
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235742
  4. [PHP53] Add Exception chaining with $previous declaration

    scottmac committed Apr 11, 2011
    Summary:
    PHP 5.3 introduces a previous parameter when throwing an exception.
    
    This allows chaining if an exception is caught and another thrown.
    
    Task ID: #533174
    
    Blame Rev:
    
    Reviewers: mwilliams
    
    CC:
    
    Test Plan:
    
    From PHP Manual
    
    <?php
    class MyCustomException extends Exception {}
    
    function doStuff() {
        try {
            throw new InvalidArgumentException("You are doing it wrong!", 112);
        } catch(Exception $e) {
            throw new MyCustomException("Something happend", 911, $e);
        }
    }
    
    try {
        doStuff();
    } catch(Exception $e) {
        do {
            printf("%s:%d %s (%d) [%s]\n", $e->getFile(), $e->getLine(), $e->getMessage(), $e->getCode(), get_class($e));
        } while($e = $e->getPrevious());
    }
    
    Revert Plan:
    Ok
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235628
  5. Make string-too-large exception more explicit

    heise committed with scottmac Apr 11, 2011
    Summary:
    This patch makes it clear that an hphp script is failing because we are
    imposing a 512MB-1 max string limit.
    
    Task ID: #
    
    Reviewed By: macvicar
    Reviewers: hzhao, myang, macvicar, qigao
    CC: macvicar
    Revert Plan:
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235775
  6. [Fix] hphpi needs to fatal on missing type-hinted arguments

    myang committed with scottmac Apr 11, 2011
    Summary:
    Right now, hphpi executes the body of foo, and var_dumps NULL. It should
    instead raise a catchable fatal error.
    <?php
    function foo(array $a) {
    var_dump($a);
    }
    foo();
    
    I made changes to use throw_missing_typed_argument when there is a type hint.
    
    Test Plan:
    make fast_tests
    [] cat /tmp/t.php
    <?php
    function foo(array $a) {
      var_dump($a);
      return $a;
    }
    foo();
    [] hphp /tmp/t.php
    HipHop Fatal error: Argument 1 passed to foo() must be an array, none given in
    /tmp/t.php on line 6
    [] hphpi/hphpi /tmp/t.php
    HipHop Fatal error: Argument 1 passed to foo() must be an array, none given in
    /tmp/t.php on line 6
    [] cat /tmp/t1.php
    <?php
    class C {}
    function bar(C $a) {
      var_dump($a);
      return $a;
    }
    bar();
    [] hphp /tmp/t1.php
    HipHop Fatal error: Argument 1 passed to bar() must be an instance of c, none
    given in /tmp/t1.php on line 7
    [] hphpi/hphpi /tmp/t1.php
    HipHop Fatal error: Argument 1 passed to bar() must be an instance of C, none
    given in /tmp/t1.php on line 7
    [] cat /tmp/t2.php
    <?php
    function foo(int $a) {
      var_dump($a);
      return $a;
    }
    foo();
    [] hphp /tmp/t2.php
    HipHop Fatal error: Argument 1 passed to foo() must be an instance of int, none
    given in /tmp/t2.php on line 6
    [] hphpi/hphpi /tmp/t2.php
    HipHop Fatal error: Argument 1 passed to foo() must be an instance of int, none
    given in /tmp/t2.php on line 6
    
    Reviewed By: mwilliams
    Reviewers: mwilliams, qigao
    CC: achao, mwilliams
    Revert Plan:
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235802
  7. Add some live range analysis

    markw65 committed with scottmac Mar 23, 2011
    Summary:
    This adds a live range analysis pass, and a variable coalescer on top of it.
    
    The interference analysis part of this is currently very conservative: live
    ranges that coexist within a block are considered to interfere. This could be
    improved with an extra pass over each block. It may be worth doing that with
    inlining turned on, since inlining tends to produce a lot of very short lived
    (sub block) variables.
    
    Task ID: #
    
    Reviewed By: qigao
    Reviewers: myang, qigao
    CC: arice, qigao
    Revert Plan:
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 235582
  8. Crash in call_user_func_async() with error handler that uses a class

    scottmac committed Apr 6, 2011
    Summary:
    Using an error handler with a class results in a segfault since the class
    isn't available to the fiber.
    
    Test Plan:
    Script now prints an error instead of segfaulting
    <?php
    class Debug {
      function errorFunction($errno, $errmsg, $errfile, $errline)
      {
      }
    }
    $a = new Debug();
    
    set_error_handler(array($a, 'errorFunction'));
    
    $h = call_user_func_async('is_bool',true);
    $r = end_user_func_async($h);
    var_dump($r);
    
    Reviewed By: myang
    Reviewers: mwilliams, myang, hzhao
    CC: myang
    Revert Plan:
    Ok
    
    Differential Revision: 233823
  9. [Fix] Fix crash in unserialize

    markw65 committed with scottmac Apr 9, 2011
    Summary:
    Another case of a bad key being passed to lvalAt. This time, its because we
    explicitly tell lvalAt that the key is good, so it doesnt bother to call toKey
    on it. We cant call toKey, because eg "1" should be different from 1 in this
    specific instance - where toKey would treat them as the same thing.
    
    So we need to check explicitly for integer or string keys, throw if not, and
    then tell lvalAt to use the key as is.
    
    Reviewed By: myang
    Reviewers: andrewparoski, myang
    CC: myang, lesha
    Tasks:
    
    Differential Revision: 235453
  10. [Fix] Fix File::readRecord for stream_get_line

    qigao committed with scottmac Apr 8, 2011
    Summary:
    We did not check eof when doing File::readRecord, which could
    lead to returning junk data and seg fault. This diff fixes this bug as
    well as another bug in the function where m_writepos could be
    overwritten. It also changes the behavior in eof case to return ""
    instead of false, which matches PHP better.
    
    Reviewed By: myang
    Reviewers: myang
    CC: myang
    Tasks:
    
    Revert Plan:
    OK
    
    Differential Revision: 235052
Commits on Apr 8, 2011
  1. Properly print size_t for OutOfMemoryException

    Paul Saab committed with scottmac Apr 8, 2011
    Summary:
    %zu should be used to print size_t and when throwing
    OutOfMemoryException, size_t is being cast to an int, losing the actual
    value.
    
    Reviewed By: mwilliams
    Reviewers: mwilliams
    CC: mwilliams
    Differential Revision: 234805
  2. [Fix] Fix assertion failure in VirtualHost::GetCurrent

    myang committed with scottmac Apr 7, 2011
    Summary:
    Sometimes the current virtual host isn't set and the assertion fails.
    We used to just return the default virtual host when the current virtual
    host isn't set. I changed back to that behavior and removed the assertion.
    Task ID: # 523542
    
    Blame Rev:
    
    Reviewers:
    mwilliams
    CC:
    hphp-diffs@lists.facebook.com
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 234466
  3. [Fix] Fix hphpi server crash at shutdown time

    myang committed with scottmac Apr 7, 2011
    Summary:
    When running hphpi in server mode and issue a stop command to shutdown
    the server, there was a crash recorded under /tmp/stacktrace.*. The
    crash indicates we have a case that ExecutionContext was destructed
    after the smart allocators were already destructed.
    I restructed the code by adding a new file which contains two functions:
    init_thread_locals/fini_thread_locals and register them to be run at thread
    enter/exit time. So we can enforce that g_context is reset in
    fini_thread_locals and avoid the destruct ordering problem. Other thread
    init code is also added accordingly (get_global_varialbes_check and
    ThreadInfo init).
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    qigao, mwilliams, qixin
    CC:
    hphp-diffs@lists.facebook.com
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 234383
  4. [Fix] Pagelet server needs to support is_uploaded_file/move_uploaded_…

    myang committed with scottmac Apr 6, 2011
    …file
    
    Summary:
    These two PHP functions did not work in the pagelet server because the
    rfc1867UploadedFiles (in upload.cpp) belongs to the original request
    thread and in the pagelet thread that set is empty. I made changes to
    pass along the rfc1867UploadedFiles (a set of uploaded file names) to
    the PageletTransport and made two virtual functions so that
    transport->isUploadedFile and transport->moveUploadedFile will work
    when the transport is a PageletTransport.
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    qigao
    CC:
    hphp-diffs@lists.facebook.com
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 234236
  5. [Fix] Mark the class as volatile based on its name usage

    qigao committed with scottmac Apr 6, 2011
    Summary:
    Our current mark-as-volatile method doesn't handle the
    case described in test plan very well. This diff fixes that problem by
    marking the simple variable in symbol table and use that to tell whether
    the literal strings in switch are likely to be class names. If they are,
    mark these classes as volatile since they are likely loaded dynamically.
    
    Differential Revision: 233739
  6. [Fix] Php5.3 token constants should be defined

    markw65 committed with scottmac Apr 6, 2011
    Summary:
    We were updating 5.2 tokens to their 5.3 values, but not adding new ones (eg
    T_GOTO, T_NAMESPACE etc).
    
    Reviewed By: myang
    Reviewers: je, andrewparoski, myang
    CC: arice, michalburger1, myang, mwilliams
    Differential Revision: 233690
  7. Make HPHP compiler version and compiler id accesible via ini_get()

    andrewparoski committed with scottmac Apr 6, 2011
    Summary:
    Pursuant to Task #489370, we need an easy way for PHP code to be able to
    programmatically retrieve the HPHP compiler version (currently "1.000") and
    the HPHP compiler id (a string providing the git revision and remote branch
    that was used to build the compiler).
    
    This diff updates ini_get() to support two new keys "hphp.compiler_version"
    and "hphp.compiler_id" to give PHP code a way to programmatically access
    the HPHP compiler version and HPHP compiler id.
    
    Task ID: #489370
    
    Blame Rev:
    
    Reviewers: myang, qigao, mwilliams
    
    CC: cbueno, jallen
    
    Revert Plan:
    
    Tags: hphp
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 234008
  8. [Fix] Fix type inference for void returns

    markw65 committed with scottmac Apr 6, 2011
    Summary:
    In unusual circumstacnes (see task), type inference could infer a too-specific
    type for the return of a function. This then causes problems when null is cast
    to the too-specific type.
    
    Reviewed By: myang
    Reviewers: kma, qixin, myang
    CC: yungsters, myang, mwilliams
    Tasks:
    
    Revert Plan:
    OK
    
    Differential Revision: 233958
  9. [Fix] Fix fast_tests failure

    myang committed with scottmac Apr 6, 2011
    Summary:
    If a parameter has an array type hint, the default can be either array()
    or null.
    
    Reviewed By: mwilliams
    Reviewers: qixin, qigao, mwilliams
    Commenters: qixin
    CC: qixin, myang, mwilliams, hphp-diffs@lists
    Revert Plan:
    OK
    
    Differential Revision: 233864
Commits on Apr 6, 2011
  1. raise_notice() can still cause an exception during destruction

    scottmac committed Apr 6, 2011
    Summary:
    With Eval.EnableObjDestructCall disabled and a custom error handler that throws
    an exception.
    
    The following code causes an "Unhandled exception in HPHP server engine" and
    the real error is never logged.
    
    <?php
    
    function newErrorHandler($errno, $errstr, $errfile, $errline) {
        throw new Exception("$errstr");
    }
    set_error_handler("newErrorHandler");
    
    class Boom {
        public function __destruct() {}
    }
    $a = new Boom();
    
    $content = "Boom...";
    for($i = 0; $i < 16; $i++) {
        $content = $content .''. $content;
    }
    echo $content;
    
    Reviewed By: myang
    Reviewers: myang, mwilliams
    CC: myang
    Revert Plan:
    Ok
    
    Differential Revision: 233441
  2. [Fix] Enhanced pagelet server sandbox support

    myang committed with scottmac Apr 6, 2011
    Summary:
    Based upon developer feedback, I made the change so that when "Host" isn't
    set and the sandbox mode is on, pagelet_server_task_start will use the
    request thread's host string.
    
    Reviewed By: qigao
    Reviewers: qigao
    CC: qigao, hphp-diffs@lists
    Revert Plan:
    OK
    
    Differential Revision: 233760
  3. [Fix] Fix sigma build

    markw65 committed with scottmac Apr 5, 2011
    Summary:
    sigma build seems to be ignoring the dependency  "${HEADER} : ${CLS}"
    
    I've never seen ${} used as makefile syntax before, but it seems to work for
    me. But changing it to $() to see if thats the issue.
    
    Also changing the definitions of CLS and SRC to avoid executing those shell
    commands multiple times.
    
    Reviewed By: kma
    Reviewers: kma
    CC: stein, astrehl, kma
    Revert Plan:
    OK
    
    Differential Revision: 233127
  4. Banish the "invoke_from_eval" helpers

    andrewparoski committed with scottmac Mar 9, 2011
    Summary:
    This revision gets rid of the "invoke_from_eval" helpers and changes hphpi
    to use MethodCallPackage instead.
    
    While this change does not significant reduce code size (because we only
    generated "invoke_from_eval" helpers for builtins), it reduces the
    complexity of our dynamic invocation system and it gives us better test
    coverage for the MethodCallPackage infrastructure.
    
    This change reduces the size of the hphp and hphpi binaries by about 1.4MB
    (hphp: 278.0MB -> 276.6MB, hphpi: 243.4MB -> 242.0MB), and it reduces the
    size of the www binary by 1.4MB as well.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers: myang, mwilliams
    
    CC:
    
    Revert Plan:
    
    Tags: hphp
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 221884
  5. Add sandbox support to PageletServer

    myang committed with scottmac Apr 5, 2011
    Summary:
    PageletServer isn't aware of sandbox and it always uses /var/www because
    that's SourceRootInfo::path() returns when sandbox is off (it returns
    RuntimeOption::SourceRoot which is the value of Server.SourceRoot. Therefore
    the PageletServer does not access user's intended file (unless a symlink is
    set to user's sandbox www). I made a change in f_pagelet_server_task_start so
    that SandboxMode is checked and if the caller has not explicitly passed in
    the header, we will pass on the "Host" header from the original thread.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    qigao, mwilliams
    CC:
    hphp-diffs@lists.facebook.com
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 233402
  6. Fix array_reduce()

    andrewparoski committed with scottmac Apr 5, 2011
    Summary:
    array_reduce() was skipping over the first element of the array in some
    cases. This diff fixes array_reduce() to do the right thing, and it updates
    the testcases for array_reduce().
    
    Reviewed By: myang
    Reviewers: qigao, myang
    Commenters: ffung
    CC: myang, ffung
    Tasks:
    
    Revert Plan:
    OK
    
    Differential Revision: 233049
  7. [Fix] Fix request thread hang caused by pagelet server

    myang committed with scottmac Apr 5, 2011
    Summary:
    When pagelet server is invoked with a non-existing file, it does not
    wake up the original request server which then hangs forever. I added
    onSendEnd() to notify the original request server to avoid the hang.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    qigao, mwilliams, qixin
    CC:
    hphp-diffs@lists.facebook.com
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    Differential Revision: 233358