1. 24 Oct, 2016 2 commits
    • James Sedgwick's avatar
      sync README · aa046701
      James Sedgwick authored
      Summary: as above
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4066250
      
      fbshipit-source-id: 7dfe07656dd338ec42fcd966328e46331202bf58
      aa046701
    • Sven Over's avatar
      add folly::Function::asSharedProxy · 62001f5e
      Sven Over authored
      Summary:
      This diff adds a method to folly::Function that moves the
      Function object into a copyable, callable proxy object.
      
      folly::Function already has the asStdFunction method, which
      does the same, but wraps the proxy object in a std::function.
      When a copyable shared-state proxy of a folly::Function is needed,
      it is not necessarily to turn it into a std::function.
      If instead the shared proxy will be passed to several functions
      taking folly::Function, what happens is the folly::Function
      is moved on the heap, a shared_ptr is put into a std::function,
      and that is wrapped in a new folly::Function, which always
      requires a memory allocation, because std::function is not
      noexcept-movable. When using asSharedProxy instead, an
      unspecified copyable type is returned that can implicitly
      converted into a folly::Function, but without an additional
      memory allocation at this point.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4048621
      
      fbshipit-source-id: b642027b0a6957058fe0089cceeb657ec52e8669
      62001f5e
  2. 22 Oct, 2016 1 commit
  3. 21 Oct, 2016 1 commit
    • Eric Niebler's avatar
      Reverted commit D3927397 · fbf4e10c
      Eric Niebler authored
      Summary: Someone debugged a runtime crash and traced it back to code like: `vector<fbstring>{{"this", "that"}}`. Presumably the user thought they were passing an initializer list of strings to the vector constructor. Instead, they constructed a single fbstring with two char pointers pointing into //different// strings. With the appropriate fbstring constructors, we can flag this as invalid at compile-time.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D3927397
      
      fbshipit-source-id: ab61e1e8498ec99592a2a7726eaf1cb6324f1455
      fbf4e10c
  4. 20 Oct, 2016 5 commits
    • Laurent Demailly's avatar
      improve documentation of custom singleton creation through an example · cbec2f20
      Laurent Demailly authored
      Summary:
      improve documentation of custom singleton creation through an example
      (from fbcode SIOF thread suggestion)
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4053322
      
      fbshipit-source-id: e9c2ef3d1ef43d52c0bf0a601d94c017047a23a3
      cbec2f20
    • Eric Niebler's avatar
      Prevent erroneous code like vector<fbstring>{{"this", "that"}} from compiling · d8d93ebf
      Eric Niebler authored
      Summary: Someone debugged a runtime crash and traced it back to code like: `vector<fbstring>{{"this", "that"}}`. Presumably the user thought they were passing an initializer list of strings to the vector constructor. Instead, they constructed a single fbstring with two char pointers pointing into //different// strings. With the appropriate fbstring constructors, we can flag this as invalid at compile-time.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D3927397
      
      fbshipit-source-id: a5f335073fb55bbb703a23f06874238cbdb5d91a
      d8d93ebf
    • Jim Meyering's avatar
      folly/Synchronized.h: avoid shadowing warnings · d2e50930
      Jim Meyering authored
      Summary:
      Nested uses of SYNCHRONIZED (and related) macros leads
      inevitably to shadowed variable declarations.
      There is already a use of FOLLY_GCC_DISABLE_WARNING(shadow)
      to disable -Wshadow in that code, but obviously, that cannot
      help with the new options, so do similar for them via
      the new FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS.
      
      Depends on D4041696
      
      Reviewed By: markisaa
      
      Differential Revision: D4041728
      
      fbshipit-source-id: b85fb3452f6855d359f9b910abbd02cf8433f3f7
      d2e50930
    • Jim Meyering's avatar
      configure.ac: check for -Wshadow-local and -Wshadow-compatible-local · 9047707e
      Jim Meyering authored
      Summary:
      Add a configure-time check for whether -Wshadow-local and
      -Wshadow-compatible-local are supported.  If so, arrange to
      define HAVE_SHADOW_LOCAL_WARNINGS.
      
      In Portability.h, use that new symbol to choose whether
      to define FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS, which
      used pragmas to disable those new warnings.
      
      Differential Revision: D4041696
      
      fbshipit-source-id: 520ee88ae55147a13d0a045aca7d86567a8da99d
      9047707e
    • Shubhanshu Agrawal's avatar
      add missing includes · 8b4722fa
      Shubhanshu Agrawal authored
      Summary: add missing includes in folly fibers.q
      
      Reviewed By: A5he
      
      Differential Revision: D4036830
      
      fbshipit-source-id: 4dcb87377979f2875ba31b4869c2637a82298957
      8b4722fa
  5. 19 Oct, 2016 16 commits
  6. 18 Oct, 2016 3 commits
    • Andrew Gallagher's avatar
      folly: fixes for use with `-fvisibility-inlines-hidden` · 1a48bcd9
      Andrew Gallagher authored
      Summary:
      - Annotate non-`const` static locals in inline functions which don't require
        a single copy be used globally at runtime.
      - Move implmentation from header file to source file (to avoid multiple
        copies at runtime).
      - Mark a non-stateful static local as `const` to it easy to ignore when
        searching for problematic static locals.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4010101
      
      fbshipit-source-id: 3be94a5dc5b7029a26e11b2145c0d41968979a5c
      1a48bcd9
    • Phil Willoughby's avatar
      Fix for ExceptionWrapperTest · b74eb888
      Phil Willoughby authored
      Summary:
      Some platforms do not output anything when `std::terminate` is called; this
      fixes the test on those platforms.
      
      Reviewed By: yfeldblum, jsedgwick
      
      Differential Revision: D4001052
      
      fbshipit-source-id: 671fbca9d6d22e372189b6554440c268c0cff60b
      b74eb888
    • Marcelo Juchem's avatar
      Getting fibers to build with boost 1.61 · 0b894c40
      Marcelo Juchem authored
      Summary: This diff adapts the fibers code to the modified `fcontext` API from Boost 1.61
      
      Reviewed By: Orvid
      
      Differential Revision: D4035769
      
      fbshipit-source-id: 54a97294d33c2901af78b8dec95baaefa085c4f5
      0b894c40
  7. 15 Oct, 2016 1 commit
    • Philip Pronin's avatar
      fall back to .debug_info scan in fatal signal handler · cb3a7e45
      Philip Pronin authored
      Summary:
      We've found clang might be generating incomplete `.debug_aranges`,
      while falling back to linear `.debug_info` scan is too expensive and shouldn't
      be used by default, we can afford doing that in fatal signal handler.
      
      Also optimize `exception_tracer::printExceptionInfo()` to avoid `LocationInfo`
      resolution if `NO_FILE_AND_LINE` is used.
      
      Reviewed By: luciang, ot
      
      Differential Revision: D4020989
      
      fbshipit-source-id: 84172208736b224c19206da48bcb3b5c0b2c67d0
      cb3a7e45
  8. 14 Oct, 2016 3 commits
    • Nicholas Ormrod's avatar
      Backed out changeset 09c1712854b3 · fc838f2b
      Nicholas Ormrod authored
      Summary: Removing COW from fbstring had adverse memory consequences when sync'd with libgcc. Revert this diff to keep folly and libgcc in sync.
      
      Reviewed By: yfeldblum, luciang
      
      Differential Revision: D4019604
      
      fbshipit-source-id: 80bd31c220098bfab37f0effc90f67876432369d
      fc838f2b
    • Shubhanshu Agrawal's avatar
      BatchDispatcher exception handling · 2c0ece4a
      Shubhanshu Agrawal authored
      Summary: error handling for batch dispatcher, for the case where dispatch function throws.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4016246
      
      fbshipit-source-id: ac61b873a425128be7839a119591fca10608210a
      2c0ece4a
    • Matthieu Martin's avatar
      noexcept CollectVariadicContext destructor · 954899b8
      Matthieu Martin authored
      Summary: To be explicit about our assumption from D4013691
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D4015816
      
      fbshipit-source-id: 24f984ac9959d0c4c0aeac34b3dce8dfcf2c1354
      954899b8
  9. 13 Oct, 2016 5 commits
  10. 12 Oct, 2016 3 commits