1. 19 Nov, 2016 5 commits
  2. 18 Nov, 2016 10 commits
    • Christopher Dykes's avatar
      Disable a range test under MSVC · adbc74b7
      Christopher Dykes authored
      Summary: Because, as the comment says, MSVC fails miserably at this, producing errors at compile time.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4207544
      
      fbshipit-source-id: d9a11b72877d22d3d3fe2e2c862d99601ab21431
      adbc74b7
    • Martin Martin's avatar
      Expose folly::symbolizer::dumpStackTrace(). · ff77522a
      Martin Martin authored
      Summary:
      Expose folly::symbolizer::dumpStackTrace() for use with
      custom signal handlers.
      
      Reviewed By: luciang
      
      Differential Revision: D4174004
      
      fbshipit-source-id: 510b77edef652f3e9d10f0acfb4998b64a15fad5
      ff77522a
    • Phil Willoughby's avatar
      Explain crash when exception is thrown from Scope Guard · ae7e1fd0
      Phil Willoughby authored
      Summary:
      Print a message to `std::cerr` when the current program is about to call `std::terminate` because a `folly::ScopeGuard` callback threw an exception. This goes to `std::terminate` in the (common) cases when the `ScopeGuard` destructor is `noexcept`
      
      This gives the user a small clue as to what just happened, since the default diagnostics for this on some platforms do not help at all.
      
      Reviewed By: nbronson
      
      Differential Revision: D4061096
      
      fbshipit-source-id: c3b534d4a36b095e08e46f375251b6fd416ccd68
      ae7e1fd0
    • Nathan Bronson's avatar
      force read for doNotOptimizeAway(*ptr_to_small_trivial) · aebb140d
      Nathan Bronson authored
      Summary:
      doNotOptimizeAway's "X" input operand constraint is interpreted
      more loosely by gcc than by clang, resulting in surprising behavior
      for doNotOptimizeAway(*ptr) and a difference in behavior between gcc
      and clang benchmarks.  clang also is more aggressive about placing an
      input operand into a register even when the constraint would allow it to
      be in memory, so an "r,m" constraint has a similar problem.  This diff
      changes the input constraint so that register-sized values must actually
      be copied into a register, which makes the behavior more intuitive and
      more consistent across platforms.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D4199767
      
      fbshipit-source-id: aa56a7b11cb3229b95da87295f0dfc38476959d2
      aebb140d
    • Yedidya Feldblum's avatar
      Fix Build: folly with -Wmissing-braces · 005736d3
      Yedidya Feldblum authored
      Summary:
      [Folly] Fix Build: `folly` with `-Wmissing-braces`.
      
      Construction of `std::array` with list-initialization for the contained C array requires double braces, per the standard.
      
      Compilers accept it with single braces, but will reject it when `-Wmissing-braces` is passed.
      
      Reviewed By: igorsugak, meyering
      
      Differential Revision: D4202629
      
      fbshipit-source-id: e5b87a655e7f25e6cddb931dda28b172c768f227
      005736d3
    • Andrew Gallagher's avatar
      folly/portability: move some macro definitions to `CPortability.h` · 7b77a513
      Andrew Gallagher authored
      Summary: These macros apply to both C and C++.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4199905
      
      fbshipit-source-id: 8dc22959d0a6349c6c76415d1a38eda52cab83a5
      7b77a513
    • Tom Jackson's avatar
      Faster unhexlify · ace896f3
      Tom Jackson authored
      Summary:
      Using already-available lookup table instead of a bunch of branching, this improves read throughput from ~750MB/s to 2.1GB/s in benchmarks.
      
      ```
      before:        (time)   (rate)
      BM_unhexlify   1.39ns  719.26M
      after:
      BM_unhexlify 470.59ps    2.13G
      ```
      
      Reviewed By: philippv
      
      Differential Revision: D4201352
      
      fbshipit-source-id: 8393e066c45c402ccb8b537fdb25417e8e6a9511
      ace896f3
    • Christopher Dykes's avatar
      Don't rely on implicit lookup of member names in dependent base classes · be0254f3
      Christopher Dykes authored
      Summary:
      The standard says this shouldn't be done, but GCC, Clang, and MSVC all do, at least, MSVC does if you don't pass the `/permissive-` switch to disable this non-compliant lookup.
      This just qualifies it with `this->` which solves the problem.
      
      MSVC plans to eventually (some time after the 2017 release) enable `/permissive-` by default, so let's start compiling with it now.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4200725
      
      fbshipit-source-id: 8545c6bcda9ba6006733c15f668805cb1260517a
      be0254f3
    • Christopher Dykes's avatar
      Include atomic in SingletonTestStructs.cpp · 1f5e574d
      Christopher Dykes authored
      Summary: This was relying on it being transitively included by system headers, which isn't the case under MSVC.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4199882
      
      fbshipit-source-id: c25dc1e86687e19851923a1a660a91bcf63f0e6d
      1f5e574d
    • Christopher Dykes's avatar
      Mark a couple more local constexpr values as static · 4bd573d6
      Christopher Dykes authored
      Summary: Because MSVC doesn't let you access it without capturing it from within a lambda otherwise.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4199867
      
      fbshipit-source-id: 7b829b2cc373edbebe3498901fa323c89a211818
      4bd573d6
  3. 17 Nov, 2016 7 commits
  4. 16 Nov, 2016 8 commits
  5. 15 Nov, 2016 6 commits
  6. 14 Nov, 2016 1 commit
  7. 13 Nov, 2016 1 commit
    • Subodh Iyengar's avatar
      Add ecdsa smart ptr · 4c7d5226
      Subodh Iyengar authored
      Summary: Add ecdsa smart ptr.
      
      Reviewed By: knekritz
      
      Differential Revision: D4173310
      
      fbshipit-source-id: abd5f799b3414b70128635c4390af6f2de329e11
      4c7d5226
  8. 12 Nov, 2016 2 commits
    • Andrii Grynenko's avatar
      Move runAfterDelay/tryRunAfterDelay into TimeoutManager · ab60aed9
      Andrii Grynenko authored
      Summary: This is useful to add more TimeoutManager implementations.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4164236
      
      fbshipit-source-id: 5f2057f6ebfbdc971bc0b5594e3bc4b5a337aaef
      ab60aed9
    • Marcin Pawlowski's avatar
      try to improve folly/io/async/test:async_test - AsyncSocketTest.Write · 8c88eb0a
      Marcin Pawlowski authored
      Summary:
      the test fails a lot as seen on the task.
      To kill the connection in said test, we depeneded
      on destructor, however this uses a delayed destruction
      patter so I guess we did not destroy on time and
      we were failing the tests.
      I close socket explicitly. No idea if this misses
      the point of whole test.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4171111
      
      fbshipit-source-id: 01b8c97a04a2bcdfaeeea522ca8bcae343d6bb5d
      8c88eb0a