An error occurred fetching the project authors.
  1. 23 Feb, 2019 3 commits
    • Yedidya Feldblum's avatar
      Shrink StaticSingletonManager inline slow path · 29ec891c
      Yedidya Feldblum authored
      Summary: [Folly] Shrink `StaticSingletonManager` inline slow path by passing only one argument to the outline slow path, rather than passing three arguments. In optimized builds, the argument is an immediate loaded into a register.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D14121341
      
      fbshipit-source-id: f715225d0dc94df9bf2bef440ffeb08bb7a88fba
      29ec891c
    • Yedidya Feldblum's avatar
      Cut outdated comment in FOR_EACH_RANGE · f3729dd6
      Yedidya Feldblum authored
      Summary:
      [Folly] Cut outdated comment in `FOR_EACH_RANGE` implementation details.
      
      It refers to a shortcoming in a specific version of boost which is no longer supported in folly.
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: Orvid
      
      Differential Revision: D14197473
      
      fbshipit-source-id: 3379af1cc69ab96fcb77be0a56ea7a5762ff7db5
      f3729dd6
    • Murali Vilayannur's avatar
      Fix rangeAdjust to handle cases of non-overlapping time ranges · ed7dbad4
      Murali Vilayannur authored
      Summary:
      When adjusting nextBucketStart by rounding down, we should also check if
      that causes it to not overlap with the user-specified [start, end) time
      interval. If it does not overlap, then return an empty return type since
      this bucket does not contribute anything to the specified time-range.
      
      Reviewed By: simpkins
      
      Differential Revision: D14121401
      
      fbshipit-source-id: bbfb1d6a71c9fb99244cdff887a7a9ee18741f25
      ed7dbad4
  2. 22 Feb, 2019 5 commits
    • Yedidya Feldblum's avatar
      Revert StaticMeta deleted dtor · ab893da3
      Yedidya Feldblum authored
      Summary: [Folly] Revert `StaticMeta` deleted dtor, which does not work well with standard constructibility tests like `std::is_constructible<StaticMeta<...>, ...>`.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D14181902
      
      fbshipit-source-id: de75fe2fc864c9a32a74b8058532ef49412ac838
      ab893da3
    • Yedidya Feldblum's avatar
      FOLLY_TYPE_INFO_OF · aa63328b
      Yedidya Feldblum authored
      Summary: [Folly] `FOLLY_TYPE_INFO_OF` for cases where `folly::type_info_of` is insufficient.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D14181350
      
      fbshipit-source-id: 65d63424a5feaa6597eaddb670f760f0223717ae
      aa63328b
    • Adam Simpkins's avatar
      logging: add XCHECK_EQ and friends to XCHECK and XDCHECK · f9453967
      Adam Simpkins authored
      Summary:
      Add XCHECK_EQ(), XCHECK_NE(), XCHECK_LT(), XCHECK_LE(), XCHECK_GT(), and
      XCHECK_GE(), plus corresponding XDCHECK_*() versions that only fail in debug
      buildk.
      
      These are similar to XCHECK()/XDCHECK(), but on failure they also log the
      values of the two expressions being compared.
      
      Reviewed By: therealgymmy
      
      Differential Revision: D14016494
      
      fbshipit-source-id: dba02d748f78d306227ec734d9e52ef0bc73919b
      f9453967
    • Adam Simpkins's avatar
      fix an UBSAN failure in DistributedMutex · d3858daa
      Adam Simpkins authored
      Summary:
      Fix an `invalid-shift-base` UndefinedBehaviorSanitizer failure.
      Previously all of the DistributedMutex-inl.h tests would fail with the
      following message on my system:
      
        runtime error: left shift of 94500093116194837 by 8 places cannot be
        represented in type 'long'
      
      It might be slightly nicer in the long run to change this code to use
      `std::chrono::duration<std::uint64_t, std::nano>` throughout rather than
      `std::chrono::nanoseconds`.  Currently the `time()` function casts the
      `uint64_t` value returned by `folly::hardware_timestamp()` into a signed
      value.
      
      Reviewed By: yfeldblum, aary
      
      Differential Revision: D14180336
      
      fbshipit-source-id: b199ae22d951162dc6f31d7f1c41a7d67cbcc935
      d3858daa
    • Yedidya Feldblum's avatar
      Better constrain EvictingCacheMap iterator conversions · 679a76a9
      Yedidya Feldblum authored
      Summary: [Folly] Better constrain `EvictingCacheMap` iterator conversions.
      
      Reviewed By: shixiao
      
      Differential Revision: D14162009
      
      fbshipit-source-id: 8a3011450620fcf1ee6a137834ebbd1e5953e0ed
      679a76a9
  3. 21 Feb, 2019 8 commits
    • Gisle Dankel's avatar
      Add option to set decay time to 0 for huge page allocator · c673fbd1
      Gisle Dankel authored
      Summary:
      We observed some RSS regression for certain use cases - setting decay time to 0 should fix this as freed regions will be released back to the kernel immediately instead of delayed.
      
      The risk is that we lose regions before we can reallocate them and thus over time end up with holes in the huge page region.
      If we see this becoming an issue for some use cases, we can add a parameter to control the decay time.
      
      Releasing immediately should be OK for huge pages in most cases. For cases with frequent allocation and deallocation of large areas there can be a perf impact however.
      
      Reviewed By: interwq
      
      Differential Revision: D13853171
      
      fbshipit-source-id: 83fb95ed9c9bcb6ebdd1f80d78347e5eec61c084
      c673fbd1
    • Joe Loser's avatar
      Cut include needed from autotools build days (#1023) · 2ac8a368
      Joe Loser authored
      Summary:
      - When Folly supported autotools builds, a different include for
        `dwarf.h` was required in `folly/experimental/symbolizer/Dwarf.cpp`.
      - Since Folly does not support autotools  builds as of `1d58fd57`, cut
        this include and just assume `<dwarf.h>` works.
      Pull Request resolved: https://github.com/facebook/folly/pull/1023
      
      Reviewed By: simpkins
      
      Differential Revision: D14119901
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: f676f72ec91e25390cb3bbbe544de7cbc68e1d73
      2ac8a368
    • Yedidya Feldblum's avatar
      type_info_of · 69e54672
      Yedidya Feldblum authored
      Summary: [Folly] `type_info_of`, which returns `typeid` when RTTI is available, otherwise `nullptr`.
      
      Reviewed By: swolchok
      
      Differential Revision: D14159675
      
      fbshipit-source-id: b64ab770f12c7385bb286f658627d085e561def6
      69e54672
    • Yedidya Feldblum's avatar
      Simplify is_negative · 12314eb7
      Yedidya Feldblum authored
      Summary: [Folly] Simplify `is_negative`.
      
      Reviewed By: stevegury
      
      Differential Revision: D14141289
      
      fbshipit-source-id: 88bfd5923d90c5ac23d431110c0f2dc6c476d868
      12314eb7
    • Chad Austin's avatar
      only depend on libiberty on linux · 7a489dcf
      Chad Austin authored
      Summary: demangle.h isn't available on macOS, so only include it on Linux.
      
      Reviewed By: andrewjcg
      
      Differential Revision: D14114593
      
      fbshipit-source-id: 59b12bfb4a52ada636b3648115dec1383f58c22f
      7a489dcf
    • Yedidya Feldblum's avatar
      Avoid unary negation of unsigned in FormatValue · dcc31061
      Yedidya Feldblum authored
      Summary:
      [Folly] Avoid unary negation of unsigned in `FormatValue`, which some compilers may warn against.
      
      ```
      folly\format-inl.h(452): error C4146: unary minus operator applied to unsigned type, result still unsigned
      ```
      
      Reviewed By: Orvid
      
      Differential Revision: D14141989
      
      fbshipit-source-id: 3bff06fe09fd4ec22d93b72a74f086ad9c576692
      dcc31061
    • Yedidya Feldblum's avatar
      Remove a legacy guard around an exceptionStr overload · 9715d540
      Yedidya Feldblum authored
      Summary: [Folly] Remove a legacy guard around an `exceptionStr` overload protecting against platforms lacking `std::exception_ptr`.
      
      Reviewed By: mzlee
      
      Differential Revision: D14129260
      
      fbshipit-source-id: 2947c5b00d901ccaf58aefeef51e442121777eba
      9715d540
    • Yedidya Feldblum's avatar
      Use bit_cast in Endian · cc7dde63
      Yedidya Feldblum authored
      Summary:
      [Folly] Use `bit_cast` in `Endian`.
      
      Requires moving `bit_cast` to the top of the header.
      
      Reviewed By: aary
      
      Differential Revision: D14080604
      
      fbshipit-source-id: cae28003895f1326138459c3a951d38e27e27506
      cc7dde63
  4. 20 Feb, 2019 5 commits
    • Yedidya Feldblum's avatar
      Cut unnecessary unreachable note in exceptionStr · e90b9cb4
      Yedidya Feldblum authored
      Summary: [Folly] Cut unnecessary `assume_unreachable` in `exceptionStr`.
      
      Reviewed By: meyering
      
      Differential Revision: D14129281
      
      fbshipit-source-id: a7ae13188bb19d829a6c977243719285186dbfec
      e90b9cb4
    • Alex Guzman's avatar
      Remove code for custom OpenSSL 1.0.2 async · 02ddfa11
      Alex Guzman authored
      Summary: Removes references to custom patches to OpenSSL 1.0.2 for async from AsyncSSLSocket.
      
      Reviewed By: anirudhvr
      
      Differential Revision: D13908917
      
      fbshipit-source-id: a01c1a8a7523dd7b4b95a7f701cc6b356c645332
      02ddfa11
    • Joe Loser's avatar
      Cut backport of std::index_sequence and friends (#1022) · 08969df3
      Joe Loser authored
      Summary:
      - Backporting `std::index_sequence`, `std::integer_sequence`, and other
        associated template aliases such as `index_sequence_for` and
        `make_index_sequence` is not needed as Folly requires C++14. These
        functions and template aliases are available in C++14 standard libraries,
        including GCC 4.9.
      Pull Request resolved: https://github.com/facebook/folly/pull/1022
      
      Reviewed By: Orvid
      
      Differential Revision: D14119891
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 5ba55cc91495cf488cebfa1ebe82c0ff919e9840
      08969df3
    • Michael Liu's avatar
      Overload getKeepAliveToken · f28c81ee
      Michael Liu authored
      Summary: getKeepAlive can get a KeepAlive object and return a copy of itself
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14095402
      
      fbshipit-source-id: 9d00ebecddc938e8cf02bcb7cee0642a666db349
      f28c81ee
    • Andrew Gallagher's avatar
      folly/symbolizer: don't use ELF base address for executables · 1feb410b
      Andrew Gallagher authored
      Summary:
      I'm not entirely sure the original motivation for this, but for the current
      executable, we've been normalizing addresses from the virtual address referenced
      by the first "LOAD" program header instead of 0.  This appears to be a bug, as
      it forms invalid addresses into the ELF file.
      
      In the case of the signal handler test, this happens to work with gold, as the
      initial section lookup just happens to hit in the `.debug_str` section (as opposed
      to the expected `.text` section), and the following name translation then undoes
      the base address normalization to get a correct lookup.
      
      While this works for gold, it breaks for LLD and meant we had to opt-out folly
      out (D13279459).
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14119804
      
      fbshipit-source-id: 53dcaeb72ed75e58f9a46b15799ce1af5ff80531
      1feb410b
  5. 19 Feb, 2019 5 commits
    • Mingtao Yang's avatar
      SSLContext: Disable TLSv1.3 support by default · 7fabe818
      Mingtao Yang authored
      Summary:
      OpenSSL 1.1.1 adds TLSv1.3 support, but changes several semantics (e.g.
      assumptions on SSL_get_session() returning resumable sessions) that require
      some work to address. A lot of our AsyncSocket tests fail (e.g. tests for
      resumption will automatically fail, since TLSv1.3 has no resumption support),
      and would need to be updated to explicitly disable TLSv1.3.
      
      The plan is to eventually remove this after these items are addressed.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14073093
      
      fbshipit-source-id: 181b05395ed35aaa7deb00b8968ff4d371b683f4
      7fabe818
    • Joe Loser's avatar
      Cut backport of std::exchange (#1021) · e03e7630
      Joe Loser authored
      Summary:
      - Backporting `std:exchange` is no longer needed as Folly requires C++14
        support and C++14-compliant vendors have `std::exchange` in their
        standard library, notably including GCC 4.9.
      - Cut backport of `std::exchange` and fix call sites to explicitly use
        `std::exchange` where they were previously relying on `exchange` being
        found in the `folly` namespace.
      Pull Request resolved: https://github.com/facebook/folly/pull/1021
      
      Reviewed By: Orvid
      
      Differential Revision: D14119875
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 686a8e812f6728281b432eae1586de28d21da9dd
      e03e7630
    • Paul Jewell's avatar
      Adding DynamicConstructor specialization for enums · 6e296e64
      Paul Jewell authored
      Summary:
      A specialization for reading into enums from serialized form was added a while back. Unfortunately, no corresponding change to serialize from enums into a dynamic was added.
      
      This change adds the corresponding DynamicConstructor specialization for enums to allow serializing enums and objects containing enums.
      
      Reviewed By: ot, shixiao
      
      Differential Revision: D14091417
      
      fbshipit-source-id: 15ef8bc46843cd668b4b2c991e84167dabaf69fa
      6e296e64
    • Yedidya Feldblum's avatar
      kHasRtti · e11c6fe8
      Yedidya Feldblum authored
      Summary: [Folly] `kHasRtti` to parallel `FOLLY_HAS_RTTI`.
      
      Reviewed By: Orvid
      
      Differential Revision: D14129217
      
      fbshipit-source-id: ce60fd0b47c64c19b515d21db55aa88ba37ca637
      e11c6fe8
    • Greg McGary's avatar
      Fix "use std::launder" predicate for Android NDKs · 60db6d71
      Greg McGary authored
      Summary:
      The current predicate yields false positive for NDK r17. NDK r18 has launder without defining `__cpp_lib_launder`. NDK r19 finally gets it right by defining `__cpp_lib_launder`.
      
      r17: launder? no,  `__cpp_lib_launder` undefined, `_LIBCPP_VERSION == 6000`
      r18: launder? yes, `__cpp_lib_launder` undefined, `_LIBCPP_VERSION == 7000`
      r19: launder? yes, `__cpp_lib_launder == 201606L`, `_LIBCPP_VERSION == 8000`
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14098189
      
      fbshipit-source-id: 315dba44c6474407a8f4c1d25c81fff057d5f7db
      60db6d71
  6. 18 Feb, 2019 1 commit
    • Yedidya Feldblum's avatar
      Use StaticSingletonManager for LoggerDB::get() · a04d119c
      Yedidya Feldblum authored
      Summary:
      [Folly] Use `StaticSingletonManager` for `LoggerDB::get()` inline fast path.
      
      This also simplifies the singleton setup overall.
      
      Note that the inline slow path here is not quite as small as doing the strategy directly would be since three pointers need to be passed to the outline slow path.
      
      Reviewed By: simpkins
      
      Differential Revision: D14016983
      
      fbshipit-source-id: ea2646f8efd5c2dbcdece4ebd3b88949bc3d4294
      a04d119c
  7. 16 Feb, 2019 1 commit
  8. 15 Feb, 2019 2 commits
  9. 14 Feb, 2019 7 commits
    • Michael Liu's avatar
      Apply modernize-use-override (2nd iteration) · a4c0fd99
      Michael Liu authored
      Summary:
      Use C++11’s override and remove virtual where applicable.
      Change are automatically generated.
      
      Reviewed By: shixiao
      
      Differential Revision: D14089910
      
      fbshipit-source-id: 12c776ea06094ee77c7e07263397dab3419c5309
      a4c0fd99
    • Robert Copeland's avatar
      fix compilation of ExceptionTracer on ARM · 934a40e2
      Robert Copeland authored
      Summary:
      On ARM gcc, the unwind header defines exception_class as a char[8] rather
      than a uint64_t.  Consequently compilation of exception_tracer fails on ARM
      with the following error:
      
          .../folly/experimental/exception_tracer/ExceptionTracer.cpp: In function 'bool folly::exception_tracer::{anonymous}::isAbiCppException(const __cxxabiv1::__cxa_exception*)':
          .../folly/experimental/exception_tracer/ExceptionTracer.cpp:107:45: error: invalid operands of types 'const char [8]' and 'unsigned int' to binary 'operator&'
              return (exc->unwindHeader.exception_class & 0xffffffff) == cppClass;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      
      Construct a uint64_t for this platform.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13763587
      
      fbshipit-source-id: 011cf13cdfcd1fffdeab8c384f7274f20faecbe5
      934a40e2
    • Andrii Grynenko's avatar
      Remove priority from Core · 4c132efd
      Andrii Grynenko authored
      Summary: Wrap Executor in ExecutorWithPriority if custom priority is passed.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14079222
      
      fbshipit-source-id: 56917827f54115b90ca237c71321f7db327355e1
      4c132efd
    • Arushi Aggarwal's avatar
      Add functions for bridging semi futures · cd6352dd
      Arushi Aggarwal authored
      Reviewed By: yfeldblum
      
      Differential Revision: D14062156
      
      fbshipit-source-id: 2cdc32fc9834bd165fa8011ca1d336edaf05f653
      cd6352dd
    • Lee Howes's avatar
      Remove delayedUnsafe entirely · 7e209f43
      Lee Howes authored
      Summary:
      delayedUnsafe was deprecated.
      
      All callers have been removed. This removes the core code so that it will not sneak back in.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14029673
      
      fbshipit-source-id: 0384364a8e0ab8953e9746b91e3b6e7b2e5d7c67
      7e209f43
    • Yedidya Feldblum's avatar
      A test verifying Function with max-align callables · 44e37ec5
      Yedidya Feldblum authored
      Summary: [Folly] A test verifying `Function` behaves as expected with max-align callables.
      
      Reviewed By: aary
      
      Differential Revision: D14077496
      
      fbshipit-source-id: 8a9efaee3cc4c5d69c6a94eb5ad1928d241eb4e0
      44e37ec5
    • Lee Howes's avatar
      Add futures::sleepUnsafe to allow migration to sleep returning a SemiFuture · f3eab11b
      Lee Howes authored
      Summary: Clone sleep as sleepUnsafe as a codemod target to migrate callsites to a SemiFuture-returning sleep.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14072020
      
      fbshipit-source-id: 3dc88378732ca203c168ea2e4371508ee376cc43
      f3eab11b
  10. 13 Feb, 2019 3 commits
    • Andrii Grynenko's avatar
      Make sure doCallback() doesn't write into Executor if it's nullptr · 97baa137
      Andrii Grynenko authored
      Summary: SemiFuture implementation assumes that it's always safe to read Executor (if Executor is DeferredExecutor - then SemiFuture can never be completed until via is called, otherwise Executor is nullptr and we should never overwrite it). doCallback() however was unconditionally overwritting Executor, which resulted in TSAN reports.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D14063047
      
      fbshipit-source-id: 7553c8a2d0cbda05ad07b87297a334a69ee77f9c
      97baa137
    • Caleb Marchent's avatar
      Include range in the folly python extensions (#1013) · 9d8a3f73
      Caleb Marchent authored
      Summary:
      range.pxd needs to be exported; so that fbtrhift-py3 can compile against it
      Pull Request resolved: https://github.com/facebook/folly/pull/1013
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13987018
      
      Pulled By: calebmarchent
      
      fbshipit-source-id: 7b7e6f62e5bc23e70a3c263fb3b33cf1d439e439
      9d8a3f73
    • Yedidya Feldblum's avatar
      Remove disabled code from FOR_EACH_RANGE · f2c0cfdd
      Yedidya Feldblum authored
      Summary: [Folly] Remove disabled code from `FOR_EACH_RANGE`.
      
      Reviewed By: aary
      
      Differential Revision: D14062987
      
      fbshipit-source-id: 6d01e76debc46398ceae3be435691c20595d393e
      f2c0cfdd