Permalink
Switch branches/tags
Nothing to show
Commits on Aug 22, 2012
  1. Dump ancient (and out of date) libevent-1.4.13 diff.

    sgolemon committed Aug 22, 2012
    Builds should be against 1.4.14 (and that patch) at this point.
  2. Implement FB Specific SHUT_LISTEN

    Paul Saab authored and sgolemon committed Aug 13, 2012
    Use a FB specific option to shutdown(2) which disallows all new
    TCP connections, but does not drop any connections which have completed
    the three-way handshake and will allow the application to accept(2) any
    remaining connections.
    
    OSS Note: This feature is gated on RuntimeOption::ServerShutdownListenWait
    However OSS builds should never enable this option as the shutdown() call
    will fail due to receiving an invalid argument.
    
    This patch is included on github for consistency.
    
    You will need to reapply libevent-1.4.14.fb-changes.diff
    and build your custom libevent after applying this patch,
    but before rebuilding hiphop.
  3. Fix dynamic lookup for interface constants

    markw65 authored and sgolemon committed Aug 20, 2012
    Interface constants were omitted from the property
    tables, and so were not visible to dynamic lookup.
  4. Fix some potential length overflows in StringData

    markw65 authored and sgolemon committed Aug 20, 2012
    There were a few places where an invalid length could sneak in.
  5. Cache a copy of attrs using a free word in Class.

    kma authored and sgolemon committed Aug 20, 2012
    A lot of hot class paths involve looking up the preClass's
    attributes. perf runs for dTLB and l1-dcache load misses highlighted these
    as a possible problem.
    
    Alignment means we have a spare word in Class. Cache the preClass's
    attributes there.
Commits on Aug 21, 2012
  1. Stops response if find a RequestInitDocument redirect

    phyllipe authored and sgolemon committed Aug 20, 2012
Commits on Aug 20, 2012
  1. Remove SmartAllocator stats and stop tracking freelist size on the fly.

    edwinsmith authored and sgolemon committed Aug 16, 2012
    It should be cheaper to just calculate freelist length when we need it
    than keeping track of it on the fly.  Frequent logging of freelist
    length thwarts this, so lets not frequently log that stat.
  2. Don't allow empty property names to be created by referencing

    bwester authored and sgolemon committed Aug 16, 2012
    In HHVM, a fatal error is now thrown when an invalid object property
    (one with an empty name) is accessed while creating references.  This
    behavior matches Zend.
  3. Fix use-after-free bug in assignRefHelper

    edwinsmith authored and sgolemon committed Aug 18, 2012
    assignRefHelper() takes care to increment the refcount before
    copying a value in case destroying the LHS destroys the owner
    of the ref; but then it reads from said owner after destruction,
    which is a free-after-use bug, for example:
    
      $x = array(0);
      $x &= $x[0];
    
    It never showed up before because SmartAllocatorImpl::dealloc().
    did not garbage-fill freed memory.  We just need to save the
    newly created pointer before destroying the LHS value.
    
    This patch also enables garabge-filling for
    SmartAllocatorImpl::dealloc().
  4. s6_addr32 is a linuxism. Pack s6_addr into 32bit words manually.

    sgolemon committed Aug 20, 2012
    Explicitly pack in6_addr octets into 32bit BE words
    rather than relying on non-cross-platform s6_addr32 linuxism.
    
    Less efficient than autoboxing, but this is just a unit test.
Commits on Aug 19, 2012
  1. Rename SmartAllocatorImpl::roundup to itemSizeRoundup

    sgolemon committed Aug 19, 2012
    FreeBSD defines roundup as a macro which confuses
    gcc enough to error out.  Just use a different name.
  2. Pass -1 as placeholder fd to mmap()

    sgolemon committed Aug 19, 2012
    Per the mmap man page: MAP_ANON
    The fd and offset arguments are ignored; however, some implementations
    require fd to be -1 if MAP_ANON is specified, and portable applications
    should ensure this.
    
    FreeBSD fails on fd == 0
Commits on Aug 18, 2012
  1. Allow disabling of HardwareCounter (cont'd)

    sgolemon committed Aug 18, 2012
    Somehow missed the important part of this commit during
    the merge from internal when I committed 7761a65
  2. Allow disabling of HardwareCounter

    sgolemon committed Aug 18, 2012
    HardwareCounter depends on linux specific ioctls
    and kernel hooks.  This makes them unusable on other platforms.
  3. xml_set_element_handler should allow unsetting callbacks

    swtaarrs authored and sgolemon committed Aug 17, 2012
    If false or the empty string is passed as a callback to
    xml_set_element_handler, we should unset the callback instead of
    warning that it's invalid.
  4. sizeof() compatability fix for gcc 4.4

    sgolemon committed Aug 18, 2012
    GCC 4.4 doesn't recognize sizeof(Class::InstanceVar)
    Declare the instance var with a typedef
    and use sizeof(Class::TypeDef) instead for successful parsing.
  5. Generated files for 82e4b93

    sgolemon committed Aug 18, 2012
  6. Add gc_collect_cycles() and related builtins

    Drew Paroski authored and sgolemon committed Aug 17, 2012
    Summary:
    This diff adds the following builtins related to circular reference
    collection:
      gc_collect_cycles()
      gc_enabled()
      gc_enable()
      gc_disable()
    
    The current implementations for these functions just raise a warning and
    return. In the near future, we can hook up these builtin functions to
    HipHop's cycle collector. This will allow programs written for Zend PHP 5.3
    to transparently use HipHop's cycle collector without requiring changes to
    the program.
Commits on Aug 17, 2012
  1. Limit TestCodeRun* to 20 jobs unless overridden.

    swtaarrs authored and sgolemon committed Aug 17, 2012
    TestCodeRunVM ends up spending >85% of CPU time in _raw_spin_lock
    on the certain machines with more than 21 jobs. Cap it at 20 to be safe.
    Also let HPHP_SLOW_TESTS_JOBS apply to all TestCodeRun suites.
  2. Fix assert in SmartAllocator::alloc when sizeof(T) < sizeof(void*)

    edwinsmith authored and sgolemon committed Aug 16, 2012
    We need to enforce a minimum allocation size a) for GarbageList,
    and b) for RefCountTombstoneValue.  sizeof(void*) is not actually
    big enough, but we're getting lucky since no real-world size is
    less than 16.
  3. Annotate more variables as UninitNull.

    markw65 authored and sgolemon committed Aug 16, 2012
    I noticed that we weren't annotating the type of
    an FPassL even if the variable was known to be UninitNull.
    
    Fixing that exposed a bug in the metadata argument numbering,
    and existing tests in TestCodeRun revealed another bug in type
    inference, in scopes where $this is altered via a dynamic
    variable ($t='this'; $$t = 'surprise').
  4. The generated 86ctor method should not be callable

    markw65 authored and sgolemon committed Aug 14, 2012
    The 86ctor method is only there for the benefit of FPushCtor*, it
    should not be called via parent::__construct.
    
    This removes it from the method table altogether, since we never
    need to look it up dynamically; which also fixes:
    
      $ctor = '86ctor';
      $x->$ctor();
    
    While I was there, I also removed 86pinit and 86sinit. For now, Im
    leaving 86cinit, since it would mean increasing the size of Class
    (by one pointer).
    
    This also revealed a bug - 86ctor was not supposed to be inherited,
    but it could be if the emitter "forgot" to create one when needed -
    or if the user failed to create one using hhas. One of the hhas
    examples violated this. I changed the base class constructor to be
    __construct instead of 86ctor.
  5. Fixes for gcc-4.7.1

    markw65 authored and sgolemon committed Aug 17, 2012
    Fix various issues when compiling with gcc-4.7.1
Commits on Aug 16, 2012
  1. Make register_name_t a strong typedef

    jdelong authored and sgolemon committed Aug 9, 2012
    Using the type system to make it harder to make simple types
    of errors when using our x64 assembler.
  2. Don't translate pseudo mains

    jdelong authored and sgolemon committed Aug 14, 2012
    We're not really doing it right, and currently it doesn't
    seem to be a major perf thing.  Turn it off for now?
  3. Fix ini_get('memory_limit') to return -1 for unlimited.

    markw65 authored and sgolemon committed Aug 15, 2012
    A recent change set the default limit to INT64_MAX, which
    broke scripts which tested for -1 to see if a limit had been
    set. (eg they would set a 1G limit if no limit had been set).
  4. Have SmartAllocator bump-a-pointer on empty freelist.

    edwinsmith authored and sgolemon committed Aug 14, 2012
    When the freelist is empty, allocating from the frontier can be
    done with just two pointers, but the current code must access
    m_blocks, m_row, m_col, and m_colMax.  Instead, maintain just
    a pair of pointers (next, limit).
    
    This diff also cleans up the way SmartAllocatorImpl.m_stats
    is set up.
  5. Add support for imageantialias

    markw65 authored and sgolemon committed Aug 14, 2012
    This was disabled because it requires a special php version
    of the gd library. But the existing gd library has similar
    functionality via a different api. Since there are only
    a few functions that are affected by antialiasing it was
    fairly easy to intercept each of the affected routines and
    do the right thing.
  6. Allow CAP_SYS_NICE

    Paul Saab authored and sgolemon committed Aug 15, 2012
    We have the need to change the priority of threads, so allow
    this capability.