- 16 Nov, 2016 7 commits
-
-
Christopher Dykes authored
Summary: Because it won't compile due to an MSVC bug. See the link in the comment for more info. Reviewed By: yfeldblum Differential Revision: D4191233 fbshipit-source-id: 523deebe12379ff56934a4259b601d4ab677b9b6
-
Nathan Bronson authored
Summary: Constructing an empty FBVector by length results in a call to memset with a null destination, which is undefined behavior. This diff fixes it. Reviewed By: luciang, meyering, Gownta Differential Revision: D4191612 fbshipit-source-id: 3dcc091396fc33ac2230bd2d90906325131b0a3b
-
Christopher Dykes authored
Summary: Because, as discussed in past diffs, MSVC currently requires them to be static in order to resolve them from within the scope of a lambda when they aren't captured. The only one that actually needs to be marked as `static` is `numReps`, but I like consistency, so I marked them all as static. Reviewed By: yfeldblum Differential Revision: D4191610 fbshipit-source-id: 7246170f30551d2079b4373eefbf3d02aab6dfa9
-
Christopher Dykes authored
Summary: Because it had better be numeric or something is very wrong. Reviewed By: yfeldblum Differential Revision: D4190568 fbshipit-source-id: 52a5ebfcedb545201191fc48f66a4419eee8f748
-
Lucian Grijincu authored
Reviewed By: philippv Differential Revision: D4184097 fbshipit-source-id: 2f1f82b845528fea4667af612c92c348f8d9ec25
-
Christopher Dykes authored
Summary: MSVC currently has a bug that causes it to incorrectly resolve it to `std::queue`: https://developercommunity.visualstudio.com/content/problem/2342/c-failure-to-resolve-instance-member-in-lambda-con.html Reviewed By: lbrandy Differential Revision: D4187256 fbshipit-source-id: 207eafa339f7255ae881d8ab80f4847222c3b8c9
-
Christopher Dykes authored
Summary: Although currently the only one of these that isn't relocatable is `std::string`, making assumptions about the standard library is a terrible idea, so disable all of them. Reviewed By: yfeldblum Differential Revision: D4186024 fbshipit-source-id: 4d2a54d232df0cb05959a8d9cb1a2d2cf34d1302
-
- 15 Nov, 2016 6 commits
-
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D4152380 fbshipit-source-id: 8b3c6dc4b14b9138bb5012e05f50496e51c0fa4b
-
Christopher Dykes authored
Summary: Because it is, and so that MSVC doesn't complain about things in the fingerprint table generator. Reviewed By: yfeldblum Differential Revision: D4178562 fbshipit-source-id: 8816f413bc100b42dd72f0e991aec8559b328e9b
-
Lucian Grijincu authored
Summary: Cleaner to isolate the #ifdefs to a constant than different code based on platform. Reviewed By: yfeldblum, Orvid Differential Revision: D4179949 fbshipit-source-id: 5b9975a78cf234f29a379c1dbe489373b7f1c253
-
Andrii Grynenko authored
Summary: This is useful to add more TimeoutManager implementations. Reviewed By: yfeldblum Differential Revision: D4178511 fbshipit-source-id: 9167cfe40e7487da1c35c537f9db8a2bdf085626
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D4179908 fbshipit-source-id: 493b302cd7e9f7ebc851599b2ca5988af817387d
-
yizhiren authored
Summary: exchange A and B in this sentence : "Or, maybe x will execute in Thread B, but y and/or z will execute in Thread A". I think x in B and y,z in A is impossible. but x in A and y,z in B is possible, in that example. Closes https://github.com/facebook/folly/pull/514 Reviewed By: yfeldblum Differential Revision: D4176766 Pulled By: Orvid fbshipit-source-id: cf3a47a30d7e43e5291d6b6401198025beba33f8
-
- 14 Nov, 2016 1 commit
-
-
Alejandro Peláez authored
Summary: This reverts commit 5f2057f6ebfbdc971bc0b5594e3bc4b5a337aaef Differential Revision: D4164236 fbshipit-source-id: a397e6ba8c9d7a691cc6381b8f60bfcea3eb91b0
-
- 13 Nov, 2016 1 commit
-
-
Subodh Iyengar authored
Summary: Add ecdsa smart ptr. Reviewed By: knekritz Differential Revision: D4173310 fbshipit-source-id: abd5f799b3414b70128635c4390af6f2de329e11
-
- 12 Nov, 2016 5 commits
-
-
Andrii Grynenko authored
Summary: This is useful to add more TimeoutManager implementations. Reviewed By: yfeldblum Differential Revision: D4164236 fbshipit-source-id: 5f2057f6ebfbdc971bc0b5594e3bc4b5a337aaef
-
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
-
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
-
Andrii Grynenko authored
Reviewed By: marcinpe Differential Revision: D4171655 fbshipit-source-id: e6ef33c50d5d91e05250520171c959a893470460
-
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
-
- 11 Nov, 2016 4 commits
-
-
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
-
Andrew Gallagher authored
Reviewed By: yfeldblum Differential Revision: D4162763 fbshipit-source-id: 25c9bfae2e7679f4b98a3d64ee9f2319eb6e7f4a
-
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
-
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
-
- 10 Nov, 2016 5 commits
-
-
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
-
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
-
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
-
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
-
Andrii Grynenko authored
Reviewed By: yfeldblum, nbronson Differential Revision: D4149681 fbshipit-source-id: 37bd1b0b7d1ad6e6fa813228307abebfe772012f
-
- 09 Nov, 2016 8 commits
-
-
Christopher Dykes authored
Summary: Because GTest doesn't support it on platforms that don't implement `sigaction`. Reviewed By: yfeldblum Differential Revision: D4155882 fbshipit-source-id: fe8df316242b293afaf94c2a5d0f8a5e60b51285
-
Christopher Dykes authored
Summary: As the comment says, this disables a couple of warnings related to exporting classes derived from stdlib classes that aren't explicitly exported. Reviewed By: yfeldblum Differential Revision: D4155978 fbshipit-source-id: 6e732b53c280a3bc3a39b2128cd577ba7cb70408
-
Christopher Dykes authored
Summary: Because MSVC generates warnings if you have a control-flow statement followed by a single trailing semicolon. Reviewed By: yfeldblum Differential Revision: D4155588 fbshipit-source-id: dfd8774fc6a62675764f7e069c26b799b622a9af
-
Christopher Dykes authored
Summary: Without this flag, we were unintentionally requesting a context with access to private keys. Reviewed By: yfeldblum Differential Revision: D4155525 fbshipit-source-id: f33d18451b06e32b81d03bf6180efc1671cfa204
-
Christopher Dykes authored
Summary: Because `CHECK_EQ` is a fatal error, and makes it impossible to keep running the other tests if it fails, even if it was just a timeout. Reviewed By: yfeldblum Differential Revision: D4151084 fbshipit-source-id: db88dc2ef875e5d1fe31792f26a3dc2d223ded5e
-
Christopher Dykes authored
Summary: So that they can be run independently of the tests. Reviewed By: yfeldblum Differential Revision: D4150331 fbshipit-source-id: 3ab39024795add84885436b757f2505527297a3d
-
Christopher Dykes authored
Summary: When the implementation of `clock_gettime` for `REALTIME` and `MONOTONIC` was switched to use `std::chrono`, this didn't get switched over to the resolution of the new implementation. Reviewed By: yfeldblum Differential Revision: D4150297 fbshipit-source-id: a4578af85cae538a3ebb6da7e759058927c31d3e
-
Ali Zaveri authored
Summary: Expose isFamilyInet() in SocketAddress. This cleans up code and provides a way to validate if SocketAddress is a ipv4 or ipv6 Differential Revision: D4150650 fbshipit-source-id: dc8883e904b6577fc27bdd54064fcc50de93b0d2
-
- 08 Nov, 2016 3 commits
-
-
Christopher Dykes authored
Summary: The min value of a `char` is `-128`, but we're initializing our `size_t` i's with it, so, as MSVC quite rightly warns (as C6294) the condition is never true and the loop never loops. Fix it by signing our i's. Reviewed By: yfeldblum Differential Revision: D4145419 fbshipit-source-id: 87591d0f84c54472b1b5847e025d091de3f98bca
-
James Sedgwick authored
Summary: this diff adds tryReadUntil, which is a mirror of tryWriteUntil in both function and implementation. Two bugs were exposed in the process of implementing and testing tryWriteUntil; they are fixed as well and are as follows: 1. tryObtainPromisedPopTicket didn't assign to the passed ticket return reference in the failure case 2. TurnSequencer::tryWaitForTurn() didn't distinguish between past turns and timeouts in the failure case; they need to be differentiated because SingleElementQueue::tryWaitFor{De/En}queue() should only fail in the timeout case, not if the turn has passed. The two added unit tests are admittedly clumsy, but making the obvious simplifications to them keeps them from triggering the premature timeout race caused by bug 2 above, so I kept them as is. Reviewed By: magedm Differential Revision: D4050515 fbshipit-source-id: b0a3dd894d502c44be62d362ea347a1837df4c2f
-
Andrew Gallagher authored
Summary: These functions contain static locals which need to be exported to the global dynamic symbol table to get deduplicated at runtime. Since using `-fvisibility-inlines-hidden` demotes the visibility of these static locals, explicitly tag them. Reviewed By: yfeldblum Differential Revision: D4139154 fbshipit-source-id: 08b81721c6c945ac5556472481ae771d0eeb5f88
-