- 01 Feb, 2016 5 commits
-
-
Christopher Dykes authored
Summary: MSVC doesn't support evaluating strlen at compile time, so implement our own version instead. Reviewed By: yfeldblum, lbrandy Differential Revision: D2856926 fb-gh-sync-id: 22222350b57d9eff6a06c9d0f37d43a3cb1f2534
-
Lucian Grijincu authored
Reviewed By: philippv Differential Revision: D2886152 fb-gh-sync-id: 64c3543db831c72c7f4cf307867223270293066e
-
Lucian Grijincu authored
Summary: [ RUN ] Hash.TWang_Unmix64 folly/test/HashTest.cpp:125:20: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int' Reviewed By: philippv Differential Revision: D2886144 fb-gh-sync-id: 8d7963c087c9db34b08c07451d35e5568c750520
-
Igor Sugak authored
Summary: Fix a few `-Wmissing-field-initializers` exposed by clang. Reviewed By: yfeldblum Differential Revision: D2881902 fb-gh-sync-id: 67fdffd39d3ccca64f84055adae1f3b47fdec633
-
Neel Goyal authored
Summary: Document what the enum settings mean since they can be somewhat confusing. Reviewed By: shamdor-fb Differential Revision: D2882929 fb-gh-sync-id: 74ec30132bf5d2dce42f51a0b7b30cf2fae12dbf
-
- 30 Jan, 2016 2 commits
-
-
Igor Sugak authored
Summary: Fix a few remaining unused parameters, that are exposed only in opt build. Reviewed By: markisaa Differential Revision: D2878865 fb-gh-sync-id: d0d9761362220973cda14d99ab7342fbe8b1a469
-
Igor Sugak authored
Summary: Fix a few unused const variables exposed by clang's `-Wunused-const-variable`. Reviewed By: yfeldblum Differential Revision: D2878944 fb-gh-sync-id: f5500fda4782eac2964761c0398d016d57716269
-
- 29 Jan, 2016 5 commits
-
-
Orvid King authored
Summary: Winsock doesn't like it when you try to call getsockname on a socket that hasn't yet been connected or bound, because that socket doesn't have a name yet. This only occurred because we were trying to get the family of the socket. To solve this, I just passed the family in from the parent methods that already knew what the family was. Reviewed By: yfeldblum Differential Revision: D2871859 Pulled By: Orvid fb-gh-sync-id: 7674f565a968aa0258355fc977c185a416e4fbe4
-
Michael Lee authored
Summary: There is no universally accessible tmpdir on Android which means mkstemp fails. This diff calls a function that the test runner should provide to fill a valid temporary directory. Reviewed By: yangchi Differential Revision: D2842034 fb-gh-sync-id: 9b826757bd750af016a18adccd5a21174be644d6
-
Denis Samoylov authored
Summary: In order to avoid mandatory dependncy on elf, dwarf, unwind made new init function optional Reviewed By: markisaa Differential Revision: D2878545 fb-gh-sync-id: f66d3884a531dcf56fc1432330325ab45b149d7f
-
Michael Lee authored
Summary: This was showing up on a Linux compile to my sadness. Reviewed By: francis-ma Differential Revision: D2876010 fb-gh-sync-id: f638d593712c0aeb50177d96aaacb26575820359
-
Giuseppe Ottaviano authored
Summary: Current `getline` implementation in `fbstring` always allocates, even if the passed string is already large enough. Furthermore, the growing strategy relies on outdated assumptions about the allocator. This implementation reuses the existing allocation as much as possible, then uses exponential growth. Reviewed By: luciang, philippv Differential Revision: D2871976 fb-gh-sync-id: 8db9512030be3f4953efa8f008747827504c032c
-
- 28 Jan, 2016 9 commits
-
-
Denis Samoylov authored
Summary: Added initialization routines to test main function that can help with debugging tests Reviewed By: markisaa, yfeldblum Differential Revision: D2839759 fb-gh-sync-id: 71cad45f3747336c8c7f8706db139cd060e1442b
-
Lucian Grijincu authored
Summary: This code casts function pointers to void(*fn)(void*) and calls functions through that type. Calling functions through a different pointer type is undefined behavior. Casts were used to avoid memory allocations. `std::bind` needs a memory allocation - so it's avoided in EventBase. std::function<void()> x = std::bind(fn, args); `std::function` should use small object optimizations when possible and embed the functor in the body of `std::function`. On GCC 5.0 and forward small lambdas don't need memory allocations (lambdas being tiny structures - two pointers in this case - and a function operator). std::function<void()> y = [=] { fn(args); }; On GCC 4.7 .. 4.9 functors for which __is_location_invariant<Func> is true also don't need memory allocations. Remove undefined behavior by using a `SmallFunctor` which leverages `std::function`'s small object optimization. Reviewed By: philippv Differential Revision: D2864895 fb-gh-sync-id: ab40f60b3519ce38f43fecebf88ccdbf09d9bea9
-
Michael Lee authored
Summary: I'm not sure what accepted practice is to make the -Wunused-parameter not balk. Reviewed By: igorsugak Differential Revision: D2874705 fb-gh-sync-id: 8765bae504fd90dfd8896857f4bf865ca8f64a8a
-
Marcus Holland-Moritz authored
Summary: D2872406 enables -Werror=unused-parameter, which in conjunction with mode/opt (which eliminates asserts) causes two files in folly/io/async to fail to compile. This change works around the error. Reviewed By: vchalyshev Differential Revision: D2874625 fb-gh-sync-id: 97104679f964390c5df88ee7831af7df243a152a
-
Igor Sugak authored
Summary: Mechanical changes (using custom clang-tidy) to fix all of the `-Wunused-parameter` violations in folly. Reviewed By: yfeldblum Differential Revision: D2872406 fb-gh-sync-id: bdb1941f3dadf6ab854e7a9f271f50fda93f9480
-
Igor Sugak authored
Summary: Remove unused argument `iters`. Reviewed By: meyering Differential Revision: D2872551 fb-gh-sync-id: 0989e5b256d4d80dd3ad02401e3fc65d0f749ba6
-
Francis Ma authored
Summary: Only include guard iphone simulator and iphone devices for folly_tls Reviewed By: ldemailly Differential Revision: D2872383 fb-gh-sync-id: 00fb8c1ee03a97037e92d20aeda75f2435d71f5a
-
Igor Sugak authored
Summary: `-Wheader-hygiene` warns on using namespace directive in global context in header. Fix all of the violations. Reviewed By: yfeldblum Differential Revision: D2867655 fb-gh-sync-id: 46840f8ece99e7af262058e631635d870bd51149
-
Andrii Grynenko authored
Summary: Previously we could be reading from thread-local FiberManagerMap while it was modified. This is now fixed by keeping a per-thread list of EventBases which need to be removed from local maps. On the fast-path no action is taken, since list will be empty. Reviewed By: yfeldblum Differential Revision: D2853921 fb-gh-sync-id: f05e1924dd2b97bfb359537de1909bbe193e0cb9
-
- 27 Jan, 2016 6 commits
-
-
Francis Ma authored
Summary: This is one of the series steps to port folly::future on ios. Apple doesn't support __thread. Adding a HashingThreadId as a fallback on apple. Reviewed By: nbronson Differential Revision: D2832068 fb-gh-sync-id: c3389245f3c0bbd36de6260680f7ac6110b3206c
-
Lucian Grijincu authored
Summary: Based on diff where this was introduced in {D360195} it seems like ``` // This value should we multiple of word size. static size_t const kHeapifyCapacitySize = sizeof( typename std::aligned_storage< sizeof(InternalSizeType), alignof(value_type) >::type); // Threshold to control capacity heapifying. static size_t const kHeapifyCapacityThreshold = 100 * kHeapifyCapacitySize; ``` So anything above 100*sizeof(SizeType) should do. Reviewed By: philippv Differential Revision: D2871422 fb-gh-sync-id: a69e47286c53887ac05e89dab565b9d609e183a0
-
Orvid King authored
Summary: Folly synchronized requires disabling the shadow warning in a macro, but that doesn't work under MSVC, so abstract a mechansim out that allows them to be handled gracefully. Reviewed By: yfeldblum Differential Revision: D2870357 Pulled By: Orvid fb-gh-sync-id: a4b0e425736ddd5293f020b360244554571d397f
-
Maxim Georgiev authored
Summary: This change adds a flag to AsyncSSLSocket which forces the socket to cache local and remote addresses right after TCP connection is established. Cached address values will be available after the connection is closed. Caching addresses can be halpful in SSL handshake failure investigations. Reviewed By: yfeldblum Differential Revision: D2863274 fb-gh-sync-id: d7b415292988c2fb187a80422e8ccbf8ba8ab0e3
-
Giuseppe Ottaviano authored
Reviewed By: yfeldblum Differential Revision: D2869494 fb-gh-sync-id: 889957a92dd7f59c4b9564d1946e9f4058293839
-
Yedidya Feldblum authored
Summary: [Folly] Extract endianness checks into Portability.h. Reviewed By: fugalh Differential Revision: D2857924 fb-gh-sync-id: 23ecd2a3cad661024acb62769cd85df394786c59
-
- 26 Jan, 2016 2 commits
-
-
Christopher Dykes authored
Summary: Without this MSVC can't compile. Reviewed By: lbrandy Differential Revision: D2856598 fb-gh-sync-id: 0e146afe844b0ce5d3782528ed9c3de53f7c8b05
-
Arjen Roodselaar authored
Summary: This scripts uses fpm to build a somewhat reproducible set of debs which can be deployed to Ubuntu 14.04 hosts. The main library package carries the Folly major version number, allowing multiple versions to be installed alongside. The -dev deb is simply called libfolly-dev and will be upgraded as Folly moves forward. In accordance to the Debian packaging policies the shared libraries have their (debug) symbols stripped and saved to external symbol files, contained in the -dev deb. sgolemon, yfeldblum you guys are my best guess to review this. Feel free to suggest additional folks if needed. Reviewed By: yfeldblum Differential Revision: D2806082 fb-gh-sync-id: 42605acccdec781f7a6b59a925121e6ed7c7cdf5
-
- 25 Jan, 2016 2 commits
-
-
Christopher Dykes authored
Summary: MSVC correctly gives an error about the constexpr constructor not initializing all members. Reviewed By: yfeldblum Differential Revision: D2856806 fb-gh-sync-id: cef97639906dd3c39e3d3dc2ba939021e15edcb9
-
Michael Bejda authored
Summary: Adds a thread-safe putIfAbsent operation to the RequestContext. The current setContextData() is not sufficent to do it safely. Just like setContextData, this method is unfair, as a high volume of reads will block the spinlock. Reviewed By: fugalh Differential Revision: D2850752 fb-gh-sync-id: 2ff22ea9e9bd8f27f6ae7a57214a6dbc4fdcd4c5
-
- 22 Jan, 2016 1 commit
-
-
David Callahan authored
Summary: GCC will now dead-code eliminate the folly-based version of this test without a mechanisms to force the result to be live. Reviewed By: ttsugriy Differential Revision: D2854633 fb-gh-sync-id: 0e3841ed22c040fda7653bcfb5a3f19ca3d1f835
-
- 21 Jan, 2016 4 commits
-
-
Tom Jackson authored
Summary: Making `EXPECT_EQ(dyn1, dyn2)` easier to debug Reviewed By: luciang, ot, yfeldblum Differential Revision: D2848318 fb-gh-sync-id: 0c7cdd292665a493f2b792798df4e6966c1f28db
-
Kyle Nekritz authored
Reviewed By: elindsey Differential Revision: D2850760 fb-gh-sync-id: 60dbc3117e658d2fd083a87884892924bf313019
-
Kyle Nekritz authored
Summary: So that these deleter and unique_ptr types don't have to be redeclared every single place they are used. To be expanded on. Reviewed By: mzlee Differential Revision: D2850376 fb-gh-sync-id: e7f8bba320163b8b12a93b5cf3cd9a5921d38edc
-
Dmitry Pleshkov authored
Summary: k-th bit selection could be efficiently implemented via new BMI2 instruction set. Reviewed By: ot, philippv Differential Revision: D2843311 fb-gh-sync-id: 4c0cf52176a03422aef276ce5f677080f67f5fdf
-
- 20 Jan, 2016 2 commits
-
-
Michael Lee authored
Summary: StringTest.cpp is a mix of benchmarks and normal unittests. Fixing this. Reviewed By: yfeldblum Differential Revision: D2840804 fb-gh-sync-id: d3efc357f5f09385e9f69b70e38b64d59045ff0d
-
Michael Lee authored
Summary: Starting with this, but I will keep digging through these. The tests will be compiled into one combined test with a single main. Reviewed By: yfeldblum Differential Revision: D2841391 fb-gh-sync-id: 78fd153e282f1ca2dbe7ada942dc04fc8ba5d42d
-
- 19 Jan, 2016 1 commit
-
-
Alan Frindell authored
Summary: Needed to use StringPiece with boost::algorithm::trim() Reviewed By: yfeldblum Differential Revision: D2833657 fb-gh-sync-id: 3430b1a2540279b2f69f04c871df3bca748f2cb1
-
- 15 Jan, 2016 1 commit
-
-
Alexey Spiridonov authored
Summary: Null by itself was printing as 0, now it prints as null, which is consistent with the 'pseudo json' output. Reviewed By: yfeldblum Differential Revision: D2789284 fb-gh-sync-id: f318b8d0f8349f4b36f868c419842fb50bee9517
-