1. 14 Nov, 2018 4 commits
    • Lee Howes's avatar
      Split folly::futures::map over value and Try forms · df642f04
      Lee Howes authored
      Summary: Splits folly::futures::map over forms that take value continuations and try continuations. This allows the implementation to call Future::thenValue and Future::thenTry correctly.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D10861465
      
      fbshipit-source-id: 31044127f43e574edcc01c6bb173ecc4f0c9c90e
      df642f04
    • Yiding Jia's avatar
      Fix folly/Range.h with c++17 and libc++ again · 90ae95ed
      Yiding Jia authored
      Summary:
      Avoid create StringViewType if value_type is not POD, as with libc++ there is a
      static_assert in the class body which seems to fail.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13015696
      
      fbshipit-source-id: 090e5cd3f5e21aa8c22ea893e894b38fd3d2a745
      90ae95ed
    • Andrew Gallagher's avatar
      folly/executors: fix extraneous semi-colon · faa7f7fb
      Andrew Gallagher authored
      Reviewed By: yfeldblum
      
      Differential Revision: D13056552
      
      fbshipit-source-id: 910296cda7d392972a48c8fa3e425b4bdeaa5d26
      faa7f7fb
    • Yedidya Feldblum's avatar
      Move asm_rdtsc to its own header and rename · aedf6079
      Yedidya Feldblum authored
      Summary: [Folly] Move `asm_rdtsc` to its own header and rename to `hardware_timestamp`.
      
      Reviewed By: aary, Orvid
      
      Differential Revision: D10368436
      
      fbshipit-source-id: 88a6d1d50702e80fb3ebba5035116850c49df6ea
      aedf6079
  2. 13 Nov, 2018 6 commits
  3. 12 Nov, 2018 12 commits
    • Orvid King's avatar
      Convert ShutdownSocketSetTest to use NetworkSocket · 1d27782a
      Orvid King authored
      Summary: Convert the tests as well
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12981682
      
      fbshipit-source-id: b07567802c4ddba0e0d1fbab7ea021b9ea948c42
      1d27782a
    • Orvid King's avatar
      SSLSessionTest now uses NetworkSocket · 17aa81d3
      Orvid King authored
      Summary: Port more things over.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12989142
      
      fbshipit-source-id: 6066978e42080748658cbe6ff94034037af2c656
      17aa81d3
    • Orvid King's avatar
      NetworkSocket support in SocketPair · 95ceac65
      Orvid King authored
      Summary: More!
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818656
      
      fbshipit-source-id: acb269258524ae22bf8761407713b89cf3d57a3a
      95ceac65
    • Orvid King's avatar
      NetworkSocket support for AsyncSSLSocket · 1f1d9662
      Orvid King authored
      Summary: More things.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818556
      
      fbshipit-source-id: 8e839489eb92a3ec3f0ac391c157ad3de42d596b
      1f1d9662
    • Orvid King's avatar
      NetworkSocket support for BlockingSocket · e47087b7
      Orvid King authored
      Summary: Just keep porting, just keep porting.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818498
      
      fbshipit-source-id: 48d404ed17caa79c241e2facc1a3d93715ce02cb
      e47087b7
    • Orvid King's avatar
      NetworkSocket support for AsyncSocket · c7b21fd1
      Orvid King authored
      Summary: This is a big one, but adds support for NetworkSocket to AsyncSocket itself.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818493
      
      fbshipit-source-id: d7b73f356414b006f4fc6b1c380a8fa1c32b9a46
      c7b21fd1
    • Orvid King's avatar
      NetworkSocket support for SocketFastOpen · 083c73bd
      Orvid King authored
      Summary: More support infrastructure.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818441
      
      fbshipit-source-id: b6d3a276ea332eccf8c6f43484fd25ec543bcc08
      083c73bd
    • Orvid King's avatar
      NetworkSocket support for OpenSSLUtils · f4c9e7d2
      Orvid King authored
      Summary: More support means more diffs, as many small ones as possible.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818383
      
      fbshipit-source-id: be364e01d8d6d7b7419a2fc870c93dafcba5d2b1
      f4c9e7d2
    • Orvid King's avatar
      Support NetworkSocket in ShutdownSocketSet · f5cc18a3
      Orvid King authored
      Summary: More places supporting NetworkSocket.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818369
      
      fbshipit-source-id: 6ee0ce2dde3283ea7fd8f657329dc55c78c90714
      f5cc18a3
    • Kirk Shoop's avatar
      force newlines and lint · d580d889
      Kirk Shoop authored
      Summary: discovered that trailing single-line comment token will force clang-format to keep a new-line. used this and clang format to get some of the files clang-format clean while still being more-or-less readable
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13016291
      
      fbshipit-source-id: 0c3428e52f3366d9d90b32a551d8853d163b8298
      d580d889
    • Kirk Shoop's avatar
      fix CTAD for receiver · 10da1e9d
      Kirk Shoop authored
      Summary: used the wrong Concept to constrain the receiver CTAD for a value function.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13027571
      
      fbshipit-source-id: 5478afbb10c5145960cc6107c173da2bf241b9bc
      10da1e9d
    • Matt Glazar's avatar
      Improve assertion messages from Random::secureRandom · 486c6593
      Matt Glazar authored
      Summary:
      When the PCHECK for read() in Random::secureRandom fails, the message is often misleading.
      
      In the following case, bytesRead != size caused the assertion failure. Unfortunately, the message includes an unrelated error message ("No such file or directory"), which can throw people off:
      
        F1031 13:15:26.997059 270573 Random.cpp:69] Check failed: bytesRead >= 0 && size_t(bytesRead) == size : No such file or directory [2]
      
      Improve the message by splitting the PCHECK into a PCHECK (for the read() error) and a CHECK_EQ (for the logic error):
      
        F1108 17:33:31.771008 3185333 Random.cpp:70] Check failed: size_t(bytesRead) == size (112960 vs. 1048576)
      
      Reviewed By: yfeldblum, simpkins
      
      Differential Revision: D12856276
      
      fbshipit-source-id: fe9067972db805a54f2cc290aab11bac425601ef
      486c6593
  4. 11 Nov, 2018 2 commits
  5. 09 Nov, 2018 5 commits
    • Andrii Grynenko's avatar
      Fix potential use after move in window · cf5b2228
      Andrii Grynenko authored
      Summary:
      The lambda that gets the ctx moved in can be created before the via call.
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: spalamarchuk
      
      Differential Revision: D13009656
      
      fbshipit-source-id: 1c89905e544adc829124277465c32958a3489845
      cf5b2228
    • Yunus Rahbar's avatar
      Add copyright headers to fbcode builder source files · 07f3b3df
      Yunus Rahbar authored
      Reviewed By: simpkins
      
      Differential Revision: D12990230
      
      fbshipit-source-id: 58d82299a8fe6aed75115008fe5dfb0f46d847c6
      07f3b3df
    • Andrii Grynenko's avatar
      Use via() in window() · f4397a2e
      Andrii Grynenko authored
      Summary: This makes it work for SemiFutures with deferred work.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12982589
      
      fbshipit-source-id: 9dcd130c72e8df67e8b4773b228041f96da06b10
      f4397a2e
    • Chad Austin's avatar
      clarify when CachelinePadded is appropriate · ef2774e4
      Chad Austin authored
      Summary:
      dschatzberg and I used `folly::CachelinePadded` when
      `alignas(folly::hardware_destructive_interference_size)` would have
      sufficed.
      
      Add a comment clarifying when CachelinePadded is appropriate.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12970571
      
      fbshipit-source-id: 7d9193358a7b1aec78c95b715641396474eaebcf
      ef2774e4
    • Dan Shiovitz's avatar
      Add support for comparing/hashing IOBuf pointers · cd31e875
      Dan Shiovitz authored
      Summary: Seems reasonable to overload IOBufHash/Compare to support pointers, since they already take unique_ptrs.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12963089
      
      fbshipit-source-id: 85124939cef7a18bfd02aeff392732fb93691903
      cd31e875
  6. 08 Nov, 2018 5 commits
  7. 07 Nov, 2018 3 commits
    • Alex Guzman's avatar
      Add SSL session unique ptr type · f327ff50
      Alex Guzman authored
      Summary: As it says on tin
      
      Reviewed By: ngoyal
      
      Differential Revision: D12933389
      
      fbshipit-source-id: 6a0dcfb6aa7ae672dcd8f355bdf88a8dfe930d02
      f327ff50
    • Doron Roberts-Kedes's avatar
      Modify shutdown_race to test LifoSem shutdown vs. wait ordering · 33fed603
      Doron Roberts-Kedes authored
      Summary:
      The shutdown_race test tries to make use of uniformSubset distribution
      to achieve an ordering of shutdown/wait/post in at least 1 of 1000 runs. This
      is unnecessary to test the desired behavior of LifoSem under the possible
      orderings of shutdown/wait/post. Making matters worse, the test relies on the existence of a step size for
      uniformSubset that will a) schedule the child thread between shutdown and post in the
      parent thread, and b) continue to schedule only the child thread until after
      it calls wait. There are seeds for which this fails when new calls to
      beforeSharedAccess are added inside DeterministicSchedule.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12925523
      
      fbshipit-source-id: bf3061ecc8ebf3e8c19ca6ca337dd6c45eab03b1
      33fed603
    • Georgios Bitzes's avatar
      Fix ASan build when folly is embedded as a submodule (#960) · b5ba7c30
      Georgios Bitzes authored
      Summary:
      When folly is used as a submodule, CMAKE_SOURCE_DIR
      will point to the top-level repository, resulting
      in set_source_files_properties not taking effect
      when compiling with ASan.
      
      Replacing CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR points
      cmake to the intended file.
      Pull Request resolved: https://github.com/facebook/folly/pull/960
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12943633
      
      Pulled By: Orvid
      
      fbshipit-source-id: a73560c5578062282f38dc3ff6c7a3364fb6cf6e
      b5ba7c30
  8. 06 Nov, 2018 1 commit
    • Adam Simpkins's avatar
      add a `detach` option to `Subprocess` to avoid waiting for the child · 2b0923c6
      Adam Simpkins authored
      Summary:
      Add a `Subprocess::Options::detach()` call.  This causes the subprocess to be
      spawned in grandchild process that will be reparented to init.  The
      intermediate child process exits immediately after spawning the grandchild,
      allowing the parent process to `wait()` on it and destroy its `Subprocess`
      object without leaving any zombie children.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D10860274
      
      fbshipit-source-id: ac27d77d0033e3c03e27dd3f758ab70fd2dd990f
      2b0923c6
  9. 05 Nov, 2018 2 commits
    • Igor Sugak's avatar
      run clang-format again · d188bd70
      Igor Sugak authored
      Summary: as titled
      
      Reviewed By: Orvid
      
      Differential Revision: D12922934
      
      fbshipit-source-id: b283b905393d93fb41f18553f12ad33f335e1507
      d188bd70
    • Chad Austin's avatar
      Disallow Optional::operator=(nullptr_t) unless T is a pointer · 03f0917a
      Chad Austin authored
      Summary: The old implementation of folly::none inadvertently allowed disengaging an optional by writing `op = nullptr`. Disallow that and require `op = folly::none`.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12884724
      
      fbshipit-source-id: b17bcf00b245069d8ea2d9bc3703b0fdcaa85c07
      03f0917a