- 22 Mar, 2018 7 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Enable `-Wshadow` for clang and gcc >= 5. And disable it globally for gcc < 5 (sorry, but not sorry). The gcc < 5 implementation is far too restrictive. Reviewed By: meyering Differential Revision: D7320760 fbshipit-source-id: 49cc971afcacc92b0bb2d9c4b2d7b04405fb95b3
-
Perry Randall authored
Summary: Original commit changeset: 4f59f6c3c8aa This is to address segfaulting in instagram server tests Reviewed By: fried Differential Revision: D7368716 fbshipit-source-id: ef28fdc17fb72631550d81616c24498a3b3894a1
-
Xiao Shi authored
Summary: This diff adds a header file which includes forward declaration of F14 containers. Reviewed By: nbronson Differential Revision: D7342805 fbshipit-source-id: 01e867792d8bde3769f4c71dfb6b80574b13f2b6
-
Xiao Shi authored
Summary: * make F14 containers their own types even on platforms where we fall back to stl containers. * extract F14FastMap to be the same conditional typedef. * define custom swap operators to avoid unnecessary move construct and move assignment. Reviewed By: nbronson Differential Revision: D7295846 fbshipit-source-id: 92faa2feddc5c85dd17a5dd937004ca1839a09f6
-
Adam Simpkins authored
Summary: Update the LogName code to also treat `/` and `\\` as category separators, just like `.`. This makes it easy to use directory and file names directly as log category names. The XLOG() code already turns file names in to log category names. Previously `getXlogCategoryNameForFile()` had to do its own translation of directory separators into `.`. Users manually had to perform this translation on their own when setting the configuration for specific categories. This change makes it possible for users to specify the filename as input directly when updating the logging configuration and it automatically updates the correct category. This also allows us to avoid allocating a new string in `getXlogCategoryNameForFile()` since we no longer have to translate directory separator characters there. Reviewed By: chadaustin Differential Revision: D7348520 fbshipit-source-id: 0e996f4351798b4636786a14ebb2d8820a2cc153
-
Alfredo Altamirano authored
Summary: retryingPolicyCappedJitteredExponentialBackoff had an integer overflow. This occured usually when we had more than 64 retries, since we compute pow(2, n) and then we convert to a 64 bit integer. I added a check that it won't overflow, and if it does, then it returns the max_backoff value. Reviewed By: yfeldblum Differential Revision: D7284952 fbshipit-source-id: 7424f502b8530f8e39ba0513dd70bfc9fdc5c8e5
-
Dan Melnic authored
Summary: Revert NotificationQueue changes until the thread local changes land (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D7359322 fbshipit-source-id: c59c81c34b341e4a968b2ce14947b558b8db3a85
-
- 21 Mar, 2018 4 commits
-
-
Orvid King authored
Summary: This means using "test" rather than "tests" for the name of the test directory. Reviewed By: wqfish Differential Revision: D7355701 fbshipit-source-id: 262f746a983eef550dd9271a026e0d243d8a335d
-
John Strizich authored
Summary: Openr is only doing travis ci for ubuntu 16.04 with gcc 5 so having the example with the older flavors can be misleading for our community. Reviewed By: saifhhasan Differential Revision: D7345130 fbshipit-source-id: 684cc8e58a650050b6f63c2ec20aac1857476da7
-
Jason Fried authored
Summary: Python is considered a Safe Enivronment, where things like aborts and segfaults can not happen. If clients where used outside of "async with" we use to print a error message and then C++ would abort. This fix makes sure C++ no longer aborts but we still print the message that the "async with" should be used. Reviewed By: ambv Differential Revision: D6923956 fbshipit-source-id: 4f59f6c3c8aa5c8b2c279c728a8c011a040940af
-
Xiao Shi authored
Summary: Move the helper classes into F14TestUtil header so that F14SetTest could use them as well. Reviewed By: yfeldblum Differential Revision: D7336571 fbshipit-source-id: 9fc96e43fe882d05b6b6fbcd075a42f5184f7d62
-
- 20 Mar, 2018 8 commits
-
-
Adam Simpkins authored
Summary: std::system_error exceptions generated from an errno value should use `std::generic_category`. Previously EXPECT_THROW_ERRNO() only handled exceptions using `std::system_category` since `folly/Exception.h` (incorrectly) throws exceptions using `std::system_category` This updates EXPECT_THROW_ERRNO() to accept either std::generic_category or std::system_category. In the future we can drop the check for std::system_category here once we fix folly/Exception.h to throw exceptions using std::generic_category. Reviewed By: yfeldblum Differential Revision: D7329998 fbshipit-source-id: 89295d7c8276c9119c29325bf35c0bf27452b779
-
Jason Fried authored
Summary: This diff fixes a bug in get_client flow where we accepted hostnames but didn't perform DNS resolution on them. That has been fixed by constructing the SocketAddress passing true to allowNameLookup. While writing a unittest for this I realized that we didn't support binding servers to localhost, so I allowed for doing so. Then I realized that it would be pretty simple to extend both get_client and ThriftServer to allow for unix sockets. Discovered that unittests waiting for server.get_address() could wait forever if there was some exception in server.serve(). So I propigated the exception to the get_address future if it is not .done(). I updated all callsites that could accept a hostname/ip to accept and ipaddress object. I updated path to accept a str or a Pathlike to support pathlib.Path. Reviewed By: ambv Differential Revision: D6911229 fbshipit-source-id: 2919a720da6bfa79db85fe55de10e8519ea39c82
-
Yedidya Feldblum authored
Summary: [Folly] Let `FileUtil::writeFileAtomic` use `generic_category`. `generic_category` is the right choice overall. And this is an excuse to decouple `FileUtil` from `Conv`. Reviewed By: simpkins Differential Revision: D7314184 fbshipit-source-id: fbec3e71098e3ca41b202964886b2740ca592229
-
Yedidya Feldblum authored
Summary: [Folly] Extract a helper alias for ctor SFINAE in `SingletonThreadLocal`. Reviewed By: djwatson Differential Revision: D7316150 fbshipit-source-id: 7e3c49740dab3af37afa8a7a23f4e07cd93ff217
-
Yedidya Feldblum authored
Summary: [Folly] Rearrange `SingletonThreadLocal` members, moving member types above member functions. Reviewed By: djwatson Differential Revision: D7316143 fbshipit-source-id: c70b31935d9b5d7428bde777ea62832dc45b3971
-
Yedidya Feldblum authored
Summary: [Folly] Split `getWrapperTL` from `getWrapper` in `SingletonThreadLocal`. Allows hypothetical future changes to operate on the `ThreadLocal<Wrapper>` singleton itself, in addition to the existing code which operates on the `Wrapper` per-thread-singleton. Reviewed By: djwatson Differential Revision: D7316099 fbshipit-source-id: 80a8b7ce28da1bc64b204292032766c648f15944
-
Yedidya Feldblum authored
Summary: [Folly] Cut unnecessary `library-local` comment in `SingletonThreadLocal`. Reviewed By: djwatson Differential Revision: D7316088 fbshipit-source-id: 08b8634b2f0d32776d548115109bc65732e4c880
-
Yedidya Feldblum authored
Summary: [Folly] Cut `SingletonThreadLocal::getWrapperInline`. It would not be useful in any scenario, given that the generated code is very large. Reviewed By: djwatson Differential Revision: D7315501 fbshipit-source-id: 1ebc15ca0eaf13adaf52fae3971e7f9914bfe10e
-
- 19 Mar, 2018 9 commits
-
-
Steve O'Brien authored
Reviewed By: yfeldblum Differential Revision: D7272553 fbshipit-source-id: f0aaa278e6a81a53f78ae29b68f1bf9f1ba02899
-
Dan Melnic authored
Use unbounded queue in NotificationQueue (same as in D7164130 but with the hazptr fix from D7256905 and the singleton one from D7283390) Summary: Use unbounded queue in NotificationQueue (same as in D7164130 but with the hazptr fix from D7256905 and the singleton one from D7283390) Reviewed By: yfeldblum Differential Revision: D7278275 fbshipit-source-id: 78ea94e1c9d492febd33106b06ce275d4a90a56a
-
Nathan Bronson authored
Summary: F14VectorMap and F14VectorSet use ItemIter to interact with F14Table, but they don't actually need to be able to identify the begin ItemIter. This diff removes both the storage for packedBegin_ and the code to update it (present in all insert and erase functions) for that policy. This is a small CPU optimization, and reduces sizeof(F14Vector{Map,Set}) from 32 bytes to 24. Reviewed By: shixiao Differential Revision: D7181769 fbshipit-source-id: 318c63584543fca339a002d8bcb5872a7bd0bdd3
-
Erik Hortsch authored
Summary: Fiber suspends are incompatible with C++ exception handling. We should enforce that callers are not suspending fibers while handling exceptions. See https://fb.facebook.com/groups/560979627394613/permalink/1119586164867287/ NOTE: This check currently fires not just for baton.wait() (and all things based on baton), but also for calling runInMainContext. I'm unsure of the safety of this. Reviewed By: yfeldblum Differential Revision: D6695110 fbshipit-source-id: cf36edbab9f0573cbf639bf79d0c267681ac5914
-
Neel Goyal authored
Summary: Rename set/getServiceIdentity to set/getSessionKey. This is a more representative description since verified information is in the cert. Reviewed By: yfeldblum Differential Revision: D7184169 fbshipit-source-id: c9404419cb37d2b5ab2fcd8299975e514e3f495a
-
Yedidya Feldblum authored
Summary: [Folly] Move `folly/UncaughtExceptions.h` to `folly/lang/`. (Note: this ignores all push blocking failures!) Reviewed By: andrewjcg Differential Revision: D7319259 fbshipit-source-id: 38d47503e150e01b5e4bcded6c8207484048bf84
-
Asier Gutierrez authored
Summary: Makefile does not install detail/Singleton.h, which is needed by proxygen Closes https://github.com/facebook/folly/pull/804 Reviewed By: andrewjcg Differential Revision: D7320496 Pulled By: yfeldblum fbshipit-source-id: 8c576fe53be8292fa51a3db50dcfaa1d1cb13b6a
-
Yedidya Feldblum authored
Summary: [Folly] Tweaks to `folly/TokenBucket.h`. * No custom clock wrapper - just use the clock interface directly. * Rename from `Parameterized` to `Basic`. Reviewed By: andrewjcg Differential Revision: D7319361 fbshipit-source-id: 1a7d8761e58f5f9b06dd8fdf5f7916913354c3b9
-
Yedidya Feldblum authored
Summary: [Folly] Tests for `throw_exception`. Currently, only for platforms with exceptions. Reviewed By: andrewjcg Differential Revision: D7319127 fbshipit-source-id: 689cf68d45619eddbbda6a4c36226fc7695c1243
-
- 18 Mar, 2018 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Let `SingletonThreadLocal` no longer depend on `Singleton`. After recent changes, the dependency was only for `DefaultTag` and `DefaultMake`, not for `Singleton` or `LeakySingleton` itself. So extract the two small types to a small detail header, and split. Reviewed By: ot Differential Revision: D7300727 fbshipit-source-id: 5ccfc0abff7dbb8c2c9ea83fb9bb3a085904ce58
-
- 17 Mar, 2018 3 commits
-
-
Qinfan Wu authored
Summary: [Folly][coro] Include `Portability.h` before using `FOLLY_HAS_COROUTINES`. Reviewed By: Orvid Differential Revision: D7315956 fbshipit-source-id: 65490ced2573652e346c54aca4e67350fe3579fe
-
Orvid King authored
Summary: Boost handles ensuring destruction order is correct far better than the implementation previously being used. This gets the Windows build working again, as it's currently hitting a thread-local static destruction order issue. Specifically, the thread_local containing the backing map for the portability implementation was being destroyed before a thread_local in rcu, which caused attempts to access thread local values that had already been freed. Reviewed By: yfeldblum Differential Revision: D7312978 fbshipit-source-id: 4d7f1f4d8bb0b92e0c52366078ee7ee34c4248f2
-
Qinfan Wu authored
Summary: [Folly][coro] Disable CoroTest for gcc builds. Reviewed By: yfeldblum Differential Revision: D7314274 fbshipit-source-id: 06747135350001b55d6ce95e1ce4bf738fca0227
-
- 16 Mar, 2018 8 commits
-
-
Neel Goyal authored
Summary: Add a generic Identity class to AsyncTransport that applications are free to implement to convey identity information for both self and peer. Reviewed By: yfeldblum Differential Revision: D7177085 fbshipit-source-id: f1dcd9bb2dbf57751fe7ef0608663ddc1d527b92
-
Qinfan Wu authored
Summary: [Folly][coro] Enable tests and fix build. Reviewed By: yfeldblum, modocache Differential Revision: D7304801 fbshipit-source-id: 0975201a0521cf8275d82ee6aaebfa02986c5b79
-
Xiao Shi authored
Summary: This check is useful for other platforms and in other context where F14 is included. For the sake of fast compilation, separate this macro out so that one doesn't have to pull in the entire F14Map/Set headers to use this macro. Reviewed By: yfeldblum Differential Revision: D7300144 fbshipit-source-id: d1aeb7e3c5d2f15703dd356fc54622751e3fa71a
-
Steve O'Brien authored
Summary: Unneeded header in frequently-used file; drop it Reviewed By: yfeldblum Differential Revision: D7165040 fbshipit-source-id: b60a3cdf924ab93961a7ead3ac0653a2339a4faf
-
Steve O'Brien authored
Summary: Removing expensive, unneeded includes (esp. Boost includes) gradually. Reviewed By: yfeldblum Differential Revision: D7144471 fbshipit-source-id: b568ec75251d360a72e7fa2d656ab9463b5a4728
-
Yanan Xin authored
Summary: Add getTaskQueueSize() method in CPUThreadPoolExecutor Reviewed By: yfeldblum Differential Revision: D7294802 fbshipit-source-id: 1f37558a1f14fcc2888c654248d649365c323432
-
Orvid King authored
Summary: Windows defines `IP_MTU_DISCOVER`, but does it differently from everywhere else, so disable it unless everything required is defined. Reviewed By: yfeldblum Differential Revision: D7298640 fbshipit-source-id: 8ecc2dfd9ba83f31e9d72e0f42fb4fbf8f3e50b5
-
Nathan Bronson authored
Summary: assert(x) doesn't mark x as used in prod builds, causing problems for builds that warn on unused variables and promote warnings to errors. This diff changes assert calls to FOLLY_SAFE_DCHECK, which is better in this regard. Reviewed By: phoad, shixiao Differential Revision: D7291084 fbshipit-source-id: 1ae48a271f30182ac8a1c2cf126af0e6b4fd0a25
-