1. 16 Oct, 2015 11 commits
  2. 15 Oct, 2015 4 commits
    • Kyle Nekritz's avatar
      Add framework for switching certs based on signature_algorithms TLS extension. · f7176051
      Kyle Nekritz authored
      Summary: Added support for switching SSLContexts based on the signature_algorithms
      extension.
      This diff does not currently include any logic for determining which certs use
      SHA1 or not.
      
      Some thoughts:
      - This is a little scary since it defaults to SHA1 (assuming the client can't support
      SHA256 if we don't see SHA256 specifically in the hello extension). We need to
      be 100% sure that all clients that are going to reject SHA1 are sending this,
      and that we identify it correctly.
      - We should add logging to see when we think a client needs SHA1, when we
      actually give SHA1, etc. I'm not sure what the best way to do this is with our
      logging infrastructure.
      - This is not setup to serve any SHA1 certs to SHA256 supporting clients.
      
      Reviewed By: @siyengar
      
      Differential Revision: D2408773
      
      fb-gh-sync-id: 48ad9cdfaae25e144c0964b9bfb1c342b137ffca
      f7176051
    • Yedidya Feldblum's avatar
      Fix Build: under GCC 4.9 + ASAN, RangeSse42.cpp fails to build · c942721a
      Yedidya Feldblum authored
      Summary: [Folly] Fix Build: under GCC 4.9 + ASAN, `RangeSse42.cpp` fails to build.
      
      Reviewed By: @ldemailly, @meyering
      
      Differential Revision: D2544284
      
      fb-gh-sync-id: fd50f8b326252291ad3a5d9fe956e7e647ad0133
      c942721a
    • Subodh Iyengar's avatar
      Add handshake and connect times · 18435bce
      Subodh Iyengar authored
      Summary: Add api to get time taken to establish
      connections and to complete handshake
      for clients using AsyncSocket directly.
      
      Reviewed By: @afrind
      
      Differential Revision: D2435074
      
      fb-gh-sync-id: f44c336e62c426736eb5b3d88dd57a18572382e8
      18435bce
    • Subodh Iyengar's avatar
      Ephemeral ciphers in false start list · ae574fb9
      Subodh Iyengar authored
      Summary: Only include ephemeral ciphers in false start list.
      
      Reviewed By: @​mzlee
      
      Differential Revision: D2429447
      
      fb-gh-sync-id: 430d287a93249ff72b9ebe7db3bc283bb0712600
      ae574fb9
  3. 14 Oct, 2015 2 commits
  4. 13 Oct, 2015 12 commits
    • Orvid King's avatar
      Handle less_than_impl and greater_than_impl under MSVC · edf5c731
      Orvid King authored
      Summary: MSVC chokes on the template constraints of these functions, so use a single implementation that will be const-folded by the optimizer instead.
      Closes https://github.com/facebook/folly/pull/281
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2419069
      
      fb-gh-sync-id: c9ad3d135430f8265bbc90391b45d9295d6de362
      edf5c731
    • Hans Fugal's avatar
      (folly) have Try::moveFromTry take an lvalue · 55f34d09
      Hans Fugal authored
      Summary: This is a case of having to say what you're doing twice, and it's unnecessary.
      This change should not break anything as calling `std::move(lvalue)` where an
      lvalue reference is expected will just be superfluous.
      
      Reviewed By: @jsedgwick
      
      Differential Revision: D2534944
      
      fb-gh-sync-id: fdcd168f369d95b0f28abe23b401b4321f51fc36
      55f34d09
    • Nathan Bronson's avatar
      never destroy LifoSem's wait node pool · 1dee433c
      Nathan Bronson authored
      Summary: Some LifoSem-s survive late into program execution, which means
      that destroying the IndexedMemPool that holds LifoSem waiter nodes can
      cause crashes during program shutdown.
      
      Reviewed By: @chadparry
      
      Differential Revision: D2536597
      
      fb-gh-sync-id: c9b3b73b61f2b8bdcb00d03f4c6d3daf24b267c3
      1dee433c
    • Orvid King's avatar
      Don't do memory operations in chunks on MSVC · 5049c2b5
      Orvid King authored
      Summary: Because, especially with the way that munmap is implemented in my windows port, this is a very bad idea. Plus, it's completely unnecessary on Windows.
      Closes https://github.com/facebook/folly/pull/265
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2283757
      
      fb-gh-sync-id: 831c8aaad9bd5ad0fe091ea1e006814774d8a27c
      5049c2b5
    • Mohammad Husain's avatar
      Getter to know if the socket is accepting new connections · 19b1f5f7
      Mohammad Husain authored
      Reviewed By: @yfeldblum
      
      Differential Revision: D2534627
      
      fb-gh-sync-id: 2934911b69542b4befa8dc03ec3cadb4a148496d
      19b1f5f7
    • Ben Maurer's avatar
      Fix ThreadLocal on android/apple · b0005c7d
      Ben Maurer authored
      Summary: The thread local destructor was assuming that the singleton object
      had been created.
      
      Reviewed By: @​yangchi
      
      Differential Revision: D2536166
      
      fb-gh-sync-id: b0c08e0990f684c0afae054ee17c62a924260f2b
      b0005c7d
    • Lucian Grijincu's avatar
      folly: NotificationQueue: fix headers · cef57896
      Lucian Grijincu authored
      Summary: Include headers for all std:: stuff used in the header + getpid().
      
      ```
             #include <sys/types.h>
             #include <unistd.h>
      
             pid_t getpid(void);
             pid_t getppid(void);
      ```
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2535284
      
      fb-gh-sync-id: b1167e8f382878d27553161b9b569968006355b3
      cef57896
    • Igor Sugak's avatar
      folly: fix build with clang 3.6 -Werror · 498bc465
      Igor Sugak authored
      Summary: Fix a few `-Wsign-compare` violations
      
      Reviewed By: @meyering
      
      Differential Revision: D2527969
      
      fb-gh-sync-id: 140acbd06eedf2e2a315e1927b331ff5efb20d0f
      498bc465
    • Igor Sugak's avatar
      folly: fix clang -Wpessimizing-move · a2bab0fb
      Igor Sugak authored
      Summary: Make folly `-Wpessimizing-move` clean:
      
      Common errors:
      ```lang=bash
      folly/io/test/NetworkBenchmark.cpp:71:30: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
          unique_ptr<IOBuf> next = std::move(head->pop());
                                   ^
      folly/io/IOBufQueue.cpp:153:28: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
            appendToChain(head_, std::move(
                                 ^
      folly/IPAddressV6.cpp:341:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
          return std::move(ip);
                 ^
      folly/IPAddressV6.cpp:341:12: note: remove std::move call here
          return std::move(ip);
                 ^~~~~~~~~~  ~
      1 error generated.
      ```
      
      Reviewed By: @fugalh, @meyering
      
      Differential Revision: D2526950
      
      fb-gh-sync-id: 49291a8b49905eb9b2042d004830ff2f599dfbd3
      a2bab0fb
    • Woo Xie's avatar
      add shutdownWrite to wangle for closing socket write only · 09417cff
      Woo Xie authored
      Summary: current wangle has no way to close socket write side. writeFlags is extended so that wangle/AsyncSocketHandler can distinguish closeNow(), closeWithReset() and shutdownWrite()
      
      Reviewed By: @viswanathgs
      
      Differential Revision: D2522056
      
      fb-gh-sync-id: 60616176d78311a4a09f9761a6ccda01dd502a88
      09417cff
    • Ben Maurer's avatar
      SIOF-proof thread local · 2bebe62f
      Ben Maurer authored
      Summary: Right now ThreadLocal & friends don't operate correctly when used as a
      static variable (which is the idiomatic way to use them). The TLS id is
      allocated in the static constructor so anybody who uses the ID prior to
      first use would use an invalid ID. This makes ThreadLocal unusable for core
      code such as per-thread reference counting.
      
      This diff allocates the ID on first use. By making the invalid ID maxint we
      avoid adding any extra branches in the fast path. We can then make the
      constructor a constexpr meaning that initialization will happen prior to
      any code running.
      
      Reviewed By: @meyering
      
      Differential Revision: D2457989
      
      fb-gh-sync-id: 21d0c0d00c638fbbd36148d14d4c891f66f83706
      2bebe62f
    • Ben Maurer's avatar
      Move digits_to into .cpp · fa5d6ef3
      Ben Maurer authored
      Summary: objdump was showing that the shiftXXX tables are being generated each
      time this file is included. For example, HHVM has about 200 of each
      of the 4 tables. Since each one is 512 bytes this is 400 KB. I'm not
      quite sure why this was happening -- I'd think that the linker would
      combine a constant table that was identical.
      
      I think the best thing to do here is just to use extern template. This
      way you there's only one copy of the table and you don't have to parse
      all of this code in every file
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2506571
      
      fb-gh-sync-id: b01a522c536a2ff4136340245cacaa33897afefb
      fa5d6ef3
  5. 10 Oct, 2015 1 commit
  6. 09 Oct, 2015 4 commits
  7. 08 Oct, 2015 1 commit
  8. 07 Oct, 2015 4 commits
    • Bruno Goncalves's avatar
      Fixed #317 - unresolved reference to __atomic_is_lock_free · 60a5636b
      Bruno Goncalves authored
      Summary: Tested in:
      Distro: Fedora 20 - x86_64
      kernel: 3.19
      compiler: gcc version 4.8.3
      Closes https://github.com/facebook/folly/pull/320
      
      Reviewed By: @sgolemon
      
      Differential Revision: D2519083
      
      fb-gh-sync-id: 07b1437326c393c99feeb6e0764d664d3e22faea
      60a5636b
    • Steve O'Brien's avatar
      Singleton: remove dependency on Future · f54fbf88
      Steve O'Brien authored
      Summary: Singletons requires Futures, and Futures indirectly (via HHWheelTimeKeeper) require Singletons.  This breaks the dependency.  It removes a Future-using API which will be replaced with a better alternative.
      
      Reviewed By: @luciang
      
      Differential Revision: D2517807
      
      fb-gh-sync-id: 93df371a74d0f80dc8c55fb0eadd0b688b27b525
      f54fbf88
    • Steve O'Brien's avatar
      Singleton: un-inline initialization-time-only methods · ccbbdd36
      Steve O'Brien authored
      Summary: Move some methods which are generally only used during initialization time (registration, eager-init functions) from the header to the .cpp file
      
      Reviewed By: @luciang
      
      Differential Revision: D2513043
      
      fb-gh-sync-id: 58d1f6e0d158d805a12b8d267421927b3cfc6118
      ccbbdd36
    • Yedidya Feldblum's avatar
      Remove evil using statements from AsyncSSLSocket.h · c12818f9
      Yedidya Feldblum authored
      Summary: [Folly] Remove evil `using` statements from `AsyncSSLSocket.h`.
      
      `using` in headers is frowned upon.
      
      Consider this diff a frown.
      
      Reviewed By: @alandau
      
      Differential Revision: D2509810
      
      fb-gh-sync-id: 4a752b9f4a5be6ac4ca7c498c0168ffad5c35d7f
      c12818f9
  9. 06 Oct, 2015 1 commit