1. 18 Nov, 2016 3 commits
    • 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
  2. 17 Nov, 2016 7 commits
  3. 16 Nov, 2016 8 commits
  4. 15 Nov, 2016 6 commits
  5. 14 Nov, 2016 1 commit
  6. 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
  7. 12 Nov, 2016 5 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
    • Mirek Klimos's avatar
      Revert DLOG_INFO warnings about RequestContext being overriden · 8e312461
      Mirek Klimos authored
      Summary: This is causing a log spew on some services, let's remove it until we figure out where the problem is and fix
      
      Differential Revision: D4171379
      
      fbshipit-source-id: 2afdab6917a2498c376559f9171f6e93ab9c8ad7
      8e312461
    • Andrii Grynenko's avatar
      Make Observer.Stress test not fail under load · 5b8add09
      Andrii Grynenko authored
      Reviewed By: marcinpe
      
      Differential Revision: D4171655
      
      fbshipit-source-id: e6ef33c50d5d91e05250520171c959a893470460
      5b8add09
    • Martin Martin's avatar
      When you read from a default-constructed MPMCQueue, assert instead of SIGFPE. · 8712f361
      Martin Martin authored
      Summary:
      I accidentally forgot to specify the capacity for my
      MPMCQueue.  When I then did a blockingRead(), I got a SIGFPE.  Thanks
      to a custom signal handler that doesn't print stack traces, and a few
      more comedy of errors, I lost a day to this.  With this patch, I would
      have gotten an assertion failure instead.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4169033
      
      fbshipit-source-id: fab97ea0d5afc3c06885758b31a5e8c91ae75a45
      8712f361
  8. 11 Nov, 2016 4 commits
    • Mirek Klimos's avatar
      Add warnings when overriding RequestContext · 1d2d4f32
      Mirek Klimos authored
      Summary: We currently store the previous value on creation of RequestContextScopeGuard and reset it to the previous one when it goes out of scope - this means that if it's not unset properly somewhere, we'll prolong its life by saving it and restoring later. We need to do this because of some edge cases but a RequestContext should generally never be overridden by a different RequestContext - let's add a warning if this happens
      
      Reviewed By: djwatson, palmtenor
      
      Differential Revision: D3971904
      
      fbshipit-source-id: e72b5f01102d18977d8aa5f8dca5a7802545098a
      1d2d4f32
    • Andrew Gallagher's avatar
      folly/test/SingletonTestStructs: move inlined function to impl file · d07b730b
      Andrew Gallagher authored
      Reviewed By: yfeldblum
      
      Differential Revision: D4162763
      
      fbshipit-source-id: 25c9bfae2e7679f4b98a3d64ee9f2319eb6e7f4a
      d07b730b
    • Yedidya Feldblum's avatar
      Let folly::range(const std::array<...>&) be constexpr · b2bd22d3
      Yedidya Feldblum authored
      Summary:
      [Folly] Let `folly::range(const std::array<...>&)` be `constexpr`.
      
      This may be useful for future work.
      
      Reviewed By: simpkins
      
      Differential Revision: D4165608
      
      fbshipit-source-id: 8f1064c3cdc07301e198acd596ff26724d603cdd
      b2bd22d3
    • Jim Meyering's avatar
      folly/Foreach.h: fix FOR_EACH_R and FOR_EACH_KV to avoid shadowing warnings · 1dee6ec9
      Jim Meyering authored
      Summary:
      Fix these macros not to self-shadow for nested uses.
      How? Make each local variable name include __LINE__.
      This works in most cases, but not all: if you put the
      nested uses all on one line, you'll still get shadowing warnings.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4161553
      
      fbshipit-source-id: 9e11ae6778272c733a4c820cfb30c5db59998a5b
      1dee6ec9
  9. 10 Nov, 2016 5 commits
    • Christopher Dykes's avatar
      Always use inline-asm version on GCC/Clang · 7213df65
      Christopher Dykes authored
      Summary:
      Because the intrinsic version requires explicitly adding `__target__` attributes, which results in things not being inlined. Although the code generated with the `__target__` attribute is strictly better, ensuring it's applied on all the relevant functions is error-prone, so just use the inline assembly version for GCC/Clang so that it can be inlined elsewhere. MSVC will inline the intrinsic version without any issue.
      This also marks the functions as `ALWAYS_INLINE`, as the diff that is getting reverted made that change as well.
      
      Reviewed By: yfeldblum, philippv, ot
      
      Differential Revision: D3963935
      
      fbshipit-source-id: 47175d64e7be351eb455a4d053b91ce9392bf152
      7213df65
    • Tudor Bosman's avatar
      Add include files necessary to use symbolizer · f588dc4a
      Tudor Bosman authored
      Summary:
      Some include files are not installed, causing including symbolizer/Symbolizer.h to fail.
      Closes https://github.com/facebook/folly/pull/512
      
      Reviewed By: philippv
      
      Differential Revision: D4161113
      
      Pulled By: luciang
      
      fbshipit-source-id: 5a5f8577f8d84ba33f89073781d374b99ba37df6
      f588dc4a
    • Christopher Dykes's avatar
      Don't try to call _free_osfhnd when not compiling agains the static CRT · a9adcd15
      Christopher Dykes authored
      Summary:
      Because, unfortunately, it isn't exported from the dynamic CRT dlls :(
      There's not really a nice way to handle this when using the dynamic CRT without doing very fragile hocus-pocus that relies on the exact layout and implementation details of the file descriptor table in the CRT, so the best we can really do is close the socket and just let the file descriptor itself leak.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D4156558
      
      fbshipit-source-id: 32cb4bf357f6746cf6597b66649ff9f018fb1bed
      a9adcd15
    • Phil Willoughby's avatar
      Use std::cerr for folly/Singleton.cpp error printing · a500df07
      Phil Willoughby authored
      Summary:
      Create a local std::ios_base::Init instance to ensure that it is valid, then
      use std::cerr.
      
      Reviewed By: yfeldblum, nbronson
      
      Differential Revision: D4139681
      
      fbshipit-source-id: 03377dd417710e320a6b53298d507fd0168592f6
      a500df07
    • Andrii Grynenko's avatar
      Fix wrong use of upgrade lock · 0416e1ea
      Andrii Grynenko authored
      Reviewed By: yfeldblum, nbronson
      
      Differential Revision: D4149681
      
      fbshipit-source-id: 37bd1b0b7d1ad6e6fa813228307abebfe772012f
      0416e1ea