- 08 Sep, 2020 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] A few nits for `constexpr_strlen`, `constexpr_strcmp`. Reviewed By: ericniebler Differential Revision: D23547224 fbshipit-source-id: f232861f5cc4dbd5eb77c4bbe3b9766fd233e9f5
-
Robin Cheng authored
Summary: In the "Complex" test we can have nodes running at the same time. So appending to the same vector concurrency isn't safe. Protecting that with a mutex. Reviewed By: yfeldblum Differential Revision: D23545746 fbshipit-source-id: b6f6e8b7204cf63c7e8fbbd8fc5134cb66c8180a
-
Ivan Egorov authored
Summary: Variable length arrays are an extension to C++ standard that is not universally supported. Use a fixed size array instead. Differential Revision: D23563131 fbshipit-source-id: 743e65838e83286ea28d8de10cd9d4416e6e4e91
-
- 07 Sep, 2020 1 commit
-
-
Dan Melnic authored
Summary: Add the ability to specify the min number of threads without changing a gflag Reviewed By: stuclar Differential Revision: D23557854 fbshipit-source-id: d4394e979c123e7f312816b1dec2849d46b0de9a
-
- 06 Sep, 2020 2 commits
-
-
Ivan Egorov authored
Summary: This explains why the commonly used `int(*s1 - *s2)` was changed to a slightly less obvious alternative. Reviewed By: yfeldblum Differential Revision: D23537394 fbshipit-source-id: 152554bc9864cdf25c569216d21b0c04bea67e9d
-
Orvid King authored
Summary: This is used so needs to be included. MSVC 2019's STL exposes this. Reviewed By: yfeldblum Differential Revision: D23497796 fbshipit-source-id: 612e0fb91c5d5637c25d062a4b3afc0c67344012
-
- 05 Sep, 2020 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix `StaticSingletonManager::create_<true>` which is missing the `noexcept` specification. Reviewed By: Mizuchi, xavierd Differential Revision: D23552042 fbshipit-source-id: 629ad215602125a3e6322b36948df78c62fbef15
-
- 04 Sep, 2020 8 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Limit `StaticSingletonManager` check functions to `StaticSingletonManager` calls. Reviewed By: Alfus Differential Revision: D23544598 fbshipit-source-id: 081d324064025d5fc86bb20b9b685c2591f01642
-
Yedidya Feldblum authored
Summary: [Folly] Let `noexcept` member function template `StaticSingletonManager::create` be outline to avoid pathological inline path behavior. Reviewed By: iahs Differential Revision: D23522488 fbshipit-source-id: 5ec9ed271b814f4496812e226e0f0929f65565a2
-
Yedidya Feldblum authored
Summary: [Folly] Add missing `< 0` tests for `constexpr_strcmp` to verify that the implementation is symmetric. Reviewed By: Mizuchi Differential Revision: D23482134 fbshipit-source-id: d3cb1fe8ce4690a34a12620eb57e7a8ff57ad8a1
-
Yedidya Feldblum authored
Summary: [Folly] Make `is_same` failures easier to diagnose in `constexpr_strlen` tests. Reviewed By: Mizuchi Differential Revision: D23481769 fbshipit-source-id: a990e1b96381f976feb7b4d3efda860f38fb6fe3
-
Andrew Huang authored
Summary: These tests pass in our build system, and fail on other platforms (Ubuntu, Darwin). Specifically, they cause our folly's CI to fail, since it's run on Ubuntu. The tests fail because TLS 1.3 is being enabled for these tests. In retrospect, that *should* cause session resumption to fail, since no additional reads are being done on the socket after the handshake. I'm not quite sure yet why they pass in our build system. Reviewed By: yfeldblum Differential Revision: D23513991 fbshipit-source-id: 0a401d19300d8ca7da3f9b5f8263959eac826f8c
-
Yedidya Feldblum authored
Summary: [Folly] Some machine code check functions for `terminate` and `terminate_with`. Demonstrates the impact of adding the extra argument. Reviewed By: magedm Differential Revision: D23523207 fbshipit-source-id: c37ae61e59ca060e7e370db425cb937341bd6e09
-
Robin Cheng authored
Summary: This is pretty self-explanatory. Reviewed By: yfeldblum Differential Revision: D23514563 fbshipit-source-id: 39b5796c742bfacc830c0154bf72bbd190501e33
-
Orvid King authored
Summary: Windows needs it Reviewed By: yfeldblum Differential Revision: D23497837 fbshipit-source-id: e4fa8fadb3a7ac26e602ff5fbddaef0976d47b0d
-
- 03 Sep, 2020 17 commits
-
-
Eric Niebler authored
Summary: Avoid a needless use of the preprocessor in FixedString.h by using `kIsDebug` instead of the `NDEBUG` preprocessor macro in `checkNullTerminated`. Reviewed By: yfeldblum Differential Revision: D23411248 fbshipit-source-id: 78990ade25bcfa3956f917b2b285c096b76ecb09
-
Eric Niebler authored
Summary: It's insufficient to infer support for `constexpr` `std::strlen` by merely testing that we're using libstdc++ on a compiler other than clang. Some other compilers besides gcc can be using libstdc++ that _don't_ have `constexpr` `std::strlen`. Rather, use the compiler itself to detect support for either (a) the builtins, or (b) a `constexpr` implementation of the stdlb function, falling back to a custom `constexpr` implementation otherwise. Also, handle MSVC, which supports `__builtin_strlen` but which doesn't support either `__has_feature` or `__has_builtin`. Give `constexpr_strcmp` the same handling, but leave MSVC out of the fun because it doesn't provide `__builtin_strcmp`. Also, remove the unnecessary include of `<type_traits>`. Finally, make these functions `noexcept` for good measure. Extra info: The overload sets in the `detail` namespace in this diff are a little magical. The first overload only compiles if (a) the string literal `"a"` can be `static_cast` to `const Char*` (that is, only if `Char` is `char`), and (b) if `FOLLY_DETAIL_STR???` yields a compile-time constant (so it can be used to initialize a non-type template parameter). If both of those things are true, that overload is preferred because the last argument requires no conversion. If either of those two conditions is false, that overload has a substitution failure and is removed from consideration. Then the second overload is selected. Reviewed By: yfeldblum Differential Revision: D23407997 fbshipit-source-id: f5838c578cb62b8fd777052223222882a6575429
-
Lee Howes authored
Summary: References the folly logo from within README.md. Reviewed By: yfeldblum Differential Revision: D23490077 fbshipit-source-id: 103c0a7838f9f9982c542e5a82e8382a45d8a0b7
-
Lee Howes authored
Summary: This adds the folly logo svg to the repo to make it available at a stable location. Reviewed By: yfeldblum Differential Revision: D23503775 fbshipit-source-id: 4ba0410c6f49d1ebc5b88c21c0ba8b60f9bf96d4
-
Yedidya Feldblum authored
Summary: [Folly] Revise `is_constexpr_default_constructible_v` as a variable and as eager, and `is_constexpr_default_constructible` as a type and as deferred. Reviewed By: Mizuchi Differential Revision: D23371343 fbshipit-source-id: 192b5df78053c89acadab285b6dfb9ab52b14528
-
Nathan Bronson authored
Reviewed By: yfeldblum, Mizuchi Differential Revision: D23436113 fbshipit-source-id: 940cdca0d1d674ab4929b8f88ce48438fa0e4b25
-
Dan Melnic authored
Summary: Check result against kBlockSize Reviewed By: kevin-vigor Differential Revision: D23501893 fbshipit-source-id: b6a43474422049c93f02e0b5defd300a471bccf5
-
Ivan Murashko authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1438 The file `folly/experimental/io/test/IoTestTempFileUtil.h` does not have `pragma once` and can be included several times. It produces compilation errors. Reviewed By: Orvid Differential Revision: D23496733 fbshipit-source-id: 0309847f60992b21d07b2377d49539d78570fb09
-
Raul Tambre authored
Summary: CMake's find modules may have target-based generator expressions, which get propagated to us when generating the pkg-config file. CMake 3.19 introduces the TARGET argument to file(GENERATE), which allows resolving such generator expressions and will avoid future issues. A workaround proposed by adriaandegroot is added for CMake 3.18. Additionally changed list->string conversion to use list(JOIN) instead of string replacement. Fixes https://github.com/facebook/folly/issues/1414. Pull Request resolved: https://github.com/facebook/folly/pull/1433 Reviewed By: yfeldblum Differential Revision: D23433365 Pulled By: Orvid fbshipit-source-id: 6ef5f180e13b41f0c92137f53fd8c19ba6355dd6
-
Yedidya Feldblum authored
Summary: [Folly] Fix possible UB in `constexpr_strcmp` since signed arithmetic wraparound is undefined. Differential Revision: D23435902 fbshipit-source-id: f71103f58f9a1a69dbc7fa462703605d1fc78348
-
Andrii Grynenko authored
Summary: Because of https://github.com/google/sanitizers/issues/1116, any races detected during pthread_atfork deadlock the process. For forks issued from folly we can use an instrumented fork version to minimize the amount of code running via pthread_atfork. Reviewed By: yfeldblum Differential Revision: D23281093 fbshipit-source-id: fd4d3bf06b7992ff314f631ed899854a8b3f6c4b
-
Yedidya Feldblum authored
Summary: [Folly] Cut `FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS` since its margin of utility is too small given `folly::is_detected`. Reviewed By: Mizuchi Differential Revision: D23371271 fbshipit-source-id: 6db49163d54ffd4d862bb98345d0e71b4d114674
-
Robin Cheng authored
Summary: When setting halt_on_error to 0 (which is the default setting now for TSAN in fbcode because we want to catch all bugs), a deadlock does not immediately cause an issue. So we include exit(0) as part of the death test to handle that case. Reviewed By: yfeldblum Differential Revision: D23493015 fbshipit-source-id: fb4910edddab11e1cd00e402b6b7350a6dc941a7
-
Katie Mancini authored
Summary: We use Re2 in D22877942 for parsing multiple path prefix data fetch logging, this introduces the dependency for eden's opensource builds. Reviewed By: chadaustin Differential Revision: D23431175 fbshipit-source-id: 44b399e92cb89ba1403295ecd10bc8f8d769b02c
-
Yedidya Feldblum authored
Summary: [Folly] Simplify the fallback implementations of `constexpr_strlen` and `constexpr_strcmp` by taking advantage of C++14 `constexpr` syntax. Differential Revision: D23416900 fbshipit-source-id: 93a969282faa61b3c9ff8e75519ad4e6edd71e4e
-
Robin Cheng authored
Summary: TSAN just needs more stack doing this... Reviewed By: yfeldblum Differential Revision: D23484864 fbshipit-source-id: e5412982349f73f8ead795403dfbde2830f4e5fd
-
Robin Cheng authored
Summary: Apparently the code says, being signal unsafe is OK because the signal is created with raise(). So let's just skip that test under TSAN. Reviewed By: yfeldblum Differential Revision: D23484012 fbshipit-source-id: 697234b9f57db97c6c6aaf8131058d3ecec3d059
-
- 02 Sep, 2020 7 commits
-
-
Shai Szulanski authored
Summary: To preserve void type in roundtrip Doing this generically is pretty gross (you need to check if awaiter_type<decltype(co_viaIfAsync({}, SemiAwaitable))> has a member await_resume_try), while the cost of adding explicit overloads is low as there are only two types we care about, so I chose to do it that way. Reviewed By: yfeldblum Differential Revision: D23407270 fbshipit-source-id: cc952e2d8fa4297dbe363e22e99192fdf858134f
-
Lewis Baker authored
Summary: The Timekeeper parameter can be used to pass in manually-controlled time-sources for testing purposes if required. Reviewed By: yfeldblum Differential Revision: D23386677 fbshipit-source-id: bea09292b00f6cd018568d26e5409d2c7ff01dbe
-
Yedidya Feldblum authored
Summary: [Folly] Test `constexpr_strlen`, `constexpr_strcmp` fallback implementations alongside the main implementations, since the main implementations may fall back to the fallback implementations on some platforms but not on others, and we may only be testing on the other platforms. Differential Revision: D23432301 fbshipit-source-id: 271705cb8c2b1ab6d11c1be20e2c3023cacab583
-
Yedidya Feldblum authored
Summary: [Folly] Cut `FOLLY_CREATE_HAS_MEMBER_FN_TRAITS` since it is unused and does not match the current invoker model, replacing uses which need it with `FOLLY_CREATE_MEMBER_INVOKER`. Reviewed By: vitaut Differential Revision: D23371070 fbshipit-source-id: 7fb0f5af21321a5056e06933ebd364a0a48a8fa1
-
Shai Szulanski authored
Summary: Reduce boilerplate when defining simple coroutines, e.g. in tests Reviewed By: yfeldblum Differential Revision: D23404552 fbshipit-source-id: a19e9cb6640e3897d3c166499014ebe4c19fbf04
-
Giuseppe Ottaviano authored
Summary: D9312236 (https://github.com/facebook/folly/commit/bc16b096b1f6659e29379a650998bbfcf0c03eca) made these tests conditional on using libstdc++, but the header that defines the macro is not included prior to the `#ifdef`, so the tests (and benchmarks) are disabled unconditionally. Reviewed By: yfeldblum Differential Revision: D23469536 fbshipit-source-id: 2ab0b2d28748419d88e946eff9b09b98d361dedb
-
Yedidya Feldblum authored
Summary: [Folly] Revise `is_transparent_v` as a variable and as eager, and atop `is_detected`, and `is_transparent` as a type and as deferred. Reviewed By: Mizuchi Differential Revision: D23367991 fbshipit-source-id: be30184b04e2a1977db3faccd57e947dd33282ce
-
- 01 Sep, 2020 1 commit
-
-
Maged Michael authored
Summary: Change name of warning_list_too_large to hazptr_warning_list_too_large for consistency with other hazptr warning functions. Add missing FOLLY_EXPORT. Reviewed By: yfeldblum Differential Revision: D23436826 fbshipit-source-id: 149c62c9d1cd3320ef525a90c0b591b274228054
-