- 10 Dec, 2020 8 commits
-
-
Andrew Huang authored
Summary: Add API to allow clients to advertise support for psk_ke (non-DHE) resumption. Unfortunately, OpenSSL has no option to allow servers to support psk_ke resumption. SSL_OP_ALLOW_NO_DHE_KEX option was added in OpenSSL 1.1.1, so add the appropriate guard. Reviewed By: mingtaoy Differential Revision: D24546720 fbshipit-source-id: fd7c5b3a9f4c572876f9b421ee8f74ba7d5e252c
-
Misha Shneerson authored
Summary: EventBaseAtomicNotificationQueue is now what used to be just AtomicNotificationQueue. In the future, this allows reusing AtomicNotificationQueue with other types of executors. (Note: this ignores all push blocking failures!) Reviewed By: andriigrynenko Differential Revision: D24878180 fbshipit-source-id: d719e31c7194cb2dd6d57a103814581b802a9250
-
Shai Szulanski authored
Summary: These are similar enough that implicit conversion to make the migration boundary easy to manage seems justified Reviewed By: WillerZ Differential Revision: D25384005 fbshipit-source-id: 4602d9016919860ff0626de4fa4ae5442fca094a
-
Andrew Huang authored
Summary: Add support for Openssl's TLS 1.3 ciphersuites API. SSL_CTX_set_ciphersuites was added in OpenSSL 1.1.1, so guard it with a prereq. Reviewed By: yfeldblum, mingtaoy Differential Revision: D24542765 fbshipit-source-id: d281bb2262cd456823da1896c0c77c3ba4ab78ce
-
Eric Niebler authored
Summary: Older standard libraries provide a `std::enable_shared_from_this` that doesn't have a `weak_from_this()` member, even when compiling in C++17 mode. Change the preprocessor conditional to account for this, and select the custom Folly implementation when the `std::` one is non-conforming. This change makes special accommodation for older MSVC versions, which fails to define the `__cpp_lib_enable_shared_from_this` feature test macro, but that provides a conforming `std::enable_shared_from_this` when compiling as C++17. Reviewed By: yfeldblum, ispeters Differential Revision: D25402425 fbshipit-source-id: c53b9fcebbf93c54342824dd56fd11eaa681abd1
-
Lee Howes authored
Summary: Make futures::retrying return a SemiFuture and safely constrain where the work runs to avoid accidental inline execution. Reviewed By: yfeldblum Differential Revision: D24490957 fbshipit-source-id: 9b8c0f369084f2d26bbb4764abde6866fb09b4d9
-
Zeyi (Rice) Fan authored
Summary: Watchman's GitHub Action has been failing because of the use of `set-env` is deprecated due to security issues. See https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ for details. See https://github.com/facebook/watchman/runs/1520165260?check_suite_focus=true for example of failures. To fix it we just need to write to the special environment file. Reviewed By: chadaustin Differential Revision: D25412442 fbshipit-source-id: d31ef025189c8aebfa08d434d9373f5da7d4690e
-
Lewis Baker authored
Summary: The async stack-trace for a coroutine call-stack that was launched by calling Task<T>::semi() to create a SemiFuture would have as its first few frames: - detached_task - folly::coro::Task::semi::{lambda#1}::operator() - <the coroutine being launched> This isn't particularly useful as it doesn't tell you where the coroutine was launched from. The more interesting information here is the callsite of .semi() rather than the internals of .semi(). This reworks the implementation of .semi() to capture the return-address of the call to .semi() and then later inject this as the return-address of the async-frame when the coroutine is eventually launched. Note: This also now launches the coroutine inline inside the SemiFuture by calling .startInlineImpl(). This should avoid an extra executor reschedule. Reviewed By: yfeldblum Differential Revision: D25415029 fbshipit-source-id: ab24e86b871c78e2c3a9af843e24e2dab3254273
-
- 09 Dec, 2020 1 commit
-
-
Dan Melnic authored
Summary: IoUringBackend rework (Note: this ignores all push blocking failures!) Reviewed By: kevin-vigor Differential Revision: D25287276 fbshipit-source-id: b69cc715e8bf5da2e493a742e71a62795a62f955
-
- 08 Dec, 2020 4 commits
-
-
Dan Melnic authored
Summary: folly::ConcurrentHashMap::reserve() - avoid setting count to 0 Reviewed By: magedm Differential Revision: D25398175 fbshipit-source-id: fc61b27d145f0d800cba9d35c942c0a5c8b53e2a
-
Xiao Shi authored
Summary: This diff adds heterogeneous mutation support to ConcurrentHashMap. The gating of the allowed key types are done in `EnableHeterogeneousInsert`. `CHM::insert()` does not destructure `pair` arguments and `CHM::emplace()` does not yet attempt to identify a usable key, leaving those as future follow-ups. Reviewed By: yfeldblum Differential Revision: D25255528 fbshipit-source-id: e056db05c96d3bd29c8cbce562ecd2221884cd5f
-
Xiao Shi authored
Summary: This diff adds heterogeneous lookup handling for `ConcurrentHashMap` (`find()` and `at()`), which allows lookups on keys that the hasher and key equal functors accept but are not exactly the same as the `KeyType` of the map. Common usage of the feature include looking up with a `std::string_view` key in a `map<string, X>`, thereby avoiding creating an unnecessary temporary string object. Reviewed By: yfeldblum Differential Revision: D25250409 fbshipit-source-id: 78dad163d623794b179c1691180b54cf109784ee
-
Andrew Huang authored
Summary: Title, per the comments in D24542765 Reviewed By: mingtaoy Differential Revision: D25339949 fbshipit-source-id: a203dcd9ee4d2f3282d9d0f8706f8af9f084551c
-
- 07 Dec, 2020 2 commits
-
-
Xavier Deguillard authored
Summary: On Windows, MSVC rightfully complains about conversion from uint64_t to uint8_t and uint32_t. In both cases, the narrowing is acceptable, so let's do that. Reviewed By: yfeldblum Differential Revision: D25352231 fbshipit-source-id: aa900fc14a666f1a99bfaa45b1afac02e7209fa3
-
Cameron Pickett authored
Summary: This change introduces CO_* versions of the main GTest ASSERT_* macros that we use in test validation. These are needed as calling ASSERT_* in a coroutine does not work. ASSERT_* embeds a `return` statement, while coroutines need a `co_return` statement. Reviewed By: ispeters Differential Revision: D25369376 fbshipit-source-id: dbd95e8c21e28581f93202af4d6fea9245238f5d
-
- 04 Dec, 2020 5 commits
-
-
Xiayi Sun authored
folly: utf8ToCodePoint: enforce max valid code point is U+10FFFF - return U+FFFD / throw for well-formed UTF-8 encoded values that are larger than the max code point Summary: UTF-8 can encode large numbers, but Unicode code points are only defined up to `U+10FFFF`. For example: - the 4B UTF-8 encoding `"\xF6\x8D\x9B\ xBC"` (bits: `11110110 10001101 10011011 10111100`) is a valid UTF-8 encoding - but the encoded value is `U+18D6 (https://github.com/facebook/folly/commit/d40182262d41679cab28f6be7366cc5ff901683b)FC` which is larger than `U+10FFFF` With `opts.skip_invalid_utf8 = true;` `json::serialize` should have returned `"\ufffd"` since it the input is invalid, but due to a bug in `utf8ToCodePoint` it returned the incorrect `"\"\xF6\x8D\x9B\xBC\""`. Update `utf8ToCodePoint` to also reject 4 byte UTF-8 encoded values larger than the max Unicode code point (`U+10FFFF`). Reviewed By: luciang Differential Revision: D25275722 fbshipit-source-id: e7daeea834a0c5323923a5451a2565ceff5e4734
-
Pierre Moulon authored
Differential Revision: D25307854 fbshipit-source-id: 11b1282659b1b2c20b04e848f0c9824813af5b21
-
Jun Mei authored
Summary: This change introduces a specialization for string-to-float (32-bit) conversion. It improves fidelity to the numeric value represented by the input string. Reviewed By: vitaut Differential Revision: D25239226 fbshipit-source-id: 531aa33aa74aaeeb98d9803bcd10bd7f31654988
-
Dan Melnic authored
Summary: Fix the WriteOptions gso default value - it should be disabled Reviewed By: danobi Differential Revision: D25313187 fbshipit-source-id: 581f41d9da48405092eef303630aaa88b18d1da0
-
Misha Shneerson authored
Summary: Today, a continuation of coro or semifuture application handlers will always execute on NORMAL priority thread pool. This is because the effective executor for the task is the `ThreadManager::Impl` and its `add()` implementation does not preserver tasks' priority (which we map into thread pool). In this change, we wrap each priority/source in a separate keepalive. Generated code is routing either coro or semifuture onto the corresponding keepalive, which is preserved across tasks that do not explicitly specify a target executor. Reviewed By: andriigrynenko Differential Revision: D25105971 fbshipit-source-id: 9adaea654b3a099ff4de048026a67bdb588a3c2a
-
- 03 Dec, 2020 3 commits
-
-
Pranjal Raihan authored
Summary: `makeStaticObserver` is a helper method that returns an observer that never changes in value. Reviewed By: andriigrynenko Differential Revision: D25254488 fbshipit-source-id: 1336d0088aff1e5abfa8160bd76e4f61b68eaed8
-
Jonathan Mendoza authored
Summary: This diff enables aggregation of point-in-time snapshots of the `TDigest`s that represents the state of `BasicQuantileStat` We capture a `Snapshot` of `TDigest` and `SlidingWindow<TDigest>`. The diff exposes `TDigest` and `SlidingWindow<TDigest>` to `QuantileStats`. These objects are wrapped by the structs, `Snapshot` and `SnapshotEntry`, in `BasicQuantileStat` and `BasicQuantileStatMap`, respectively . Reviewed By: yfeldblum Differential Revision: D25170883 fbshipit-source-id: 0201a05cc4020851b652ed3a7b602d5b22aa63be
-
Maged Michael authored
Summary: Clean up tombstones when copying from a full map. Equal capacity maps are copied with tombstones for speed but that optimization should not be used if it results in a full map. Add guarantee that a copy from a map with tombstones will have at least one empty element. Reviewed By: A5he Differential Revision: D25230678 fbshipit-source-id: 900b734cc526be8da8be4e70137d19645f994f19
-
- 02 Dec, 2020 1 commit
-
-
Tom Jackson authored
Summary: It took me a while to find that I'd `co_await`'d the same `Task<>` twice when working in a loop. This would've made it easier to find. Reviewed By: andriigrynenko Differential Revision: D24718615 fbshipit-source-id: 263c0aae208eab37ab198f875dc72a03287785c1
-
- 01 Dec, 2020 6 commits
-
-
Doug Rabson authored
Summary: If timed_wait is called with an awaitable that has a non-copyable return value then we must std::move the result. Reviewed By: iahs Differential Revision: D25222893 fbshipit-source-id: bd3c0ca19d182a464ad4b430f1792dcfff54ffdf
-
Adam Ernst authored
Summary: Breaks builds. overriding_review_checks_triggers_an_audit_and_retroactive_review Oncall Short Name: fbobjc_sheriff fbshipit-source-id: 8b6437a9e87e4888a6b7a85637232308412cf416
-
Xiao Shi authored
Summary: This diff adds heterogeneous mutation support to ConcurrentHashMap. The gating of the allowed key types are done in `EnableHeterogeneousInsert`. `CHM::insert()` does not destructure `pair` arguments and `CHM::emplace()` does not yet attempt to identify a usable key, leaving those as future follow-ups. Reviewed By: yfeldblum Differential Revision: D23349316 fbshipit-source-id: 3d0b22f5c540d913db6bc93d77481d2ffc4426ac
-
Xiao Shi authored
Summary: This diff adds heterogeneous lookup handling for `ConcurrentHashMap` (`find()` and `at()`), which allows lookups on keys that the hasher and key equal functors accept but are not exactly the same as the `KeyType` of the map. Common usage of the feature include looking up with a `std::string_view` key in a `map<string, X>`, thereby avoiding creating an unnecessary temporary string object. Reviewed By: yfeldblum Differential Revision: D23279680 fbshipit-source-id: 0537d23dd6b464cfea7a5b347ecbad9a5ec5bde4
-
Alexander Sklar authored
Summary: Fixes https://github.com/facebook/folly/issues/1449 The current public VS releases (16.3 up to 16.7) have builtins support. In commit https://github.com/facebook/folly/commit/7f1bda25627503ca8af2536cc81298a7d4688375 the #ifdef that was gating the definition of builtins was removed, as 16.8 will remove it. However by removign this gate, it makes current VS versions unable to build folly which breaks projects like react-native-windows. Pull Request resolved: https://github.com/facebook/folly/pull/1450 Reviewed By: yfeldblum Differential Revision: D23702071 Pulled By: Orvid fbshipit-source-id: 6e05f63293e68783b6caae68cc5bd80ad3679766
-
Koray Polat authored
Summary: During intensive builds using all available cores tends to crash the machine. Cutting default number of jobs by half prevents that. Reviewed By: wez Differential Revision: D25027757 fbshipit-source-id: 5ea6c77fe4363b9ee09e50de1a5cc33281872e1d
-
- 23 Nov, 2020 1 commit
-
-
lorinlee authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1489 Differential Revision: D25156288 Pulled By: yfeldblum fbshipit-source-id: 01c9e6898158e9651367144c22f215ef75ff7ae3
-
- 20 Nov, 2020 5 commits
-
-
Rajan Kumar authored
Summary: Added yaml-cpp library to the fboss OSS build Reviewed By: shri-khare Differential Revision: D25126509 fbshipit-source-id: 1e88150dbf8c96a5ac696e003265dc1f14bec105
-
Rajan Kumar authored
Summary: The new library firmware_storage needs the yaml-cpp. For OSS build this diff adds the yaml-cpp library to manifest Reviewed By: shri-khare Differential Revision: D25115387 fbshipit-source-id: 9ed1c374df7e87f284c48d366095a20183719534
-
Amir Livneh authored
Reviewed By: yfeldblum Differential Revision: D24739525 fbshipit-source-id: 1ad55b470dd305dea6f3c7eeb56890ea6b59d252
-
Amir Livneh authored
Differential Revision: D24757714 fbshipit-source-id: 1a494c5eb758480431d5aa70861359e67e9f831c
-
Shawn Wu authored
Summary: The fix was part of D22249713 / D24571536. However, the error is not specific to uint8/16 support. Let's fix it right away. Reviewed By: ot Differential Revision: D24629540 fbshipit-source-id: 8cbc3226259d49ec3e64c03ca55f3ef1ac5b981d
-
- 19 Nov, 2020 4 commits
-
-
Lewis Baker authored
Summary: Updates the co_awaitTry() adapters to support the co_withAsyncStack() CPO. This required updating the WithAsyncStackAwaitable to also support co_awaitTry() but having its wrapper awaiter type also forward through the .await_resume_try() method if one exists. Modified the is_awaiter trait check to no longer check for a valid await_suspend() call as some awaiters returned from co_withAsyncStack() now require coroutine_handle<Promise> and no longer accept the coroutine_handle<void> parameter previously checked by the trait. Reviewed By: andriigrynenko Differential Revision: D24499833 fbshipit-source-id: fdcb99a2b85c4235bcd4b5dcc12cf79cb414f034
-
Lewis Baker authored
Summary: The stack-traces for child worker tasks launched to process each incoming AsyncGenerator now have the same common consumer-task as the parent frame, which is then a detached-task, rather than each of the child workers being their own detached tasks. Reviewed By: andriigrynenko Differential Revision: D24480161 fbshipit-source-id: c02887abf676bde9b297ee6d8f0fcabe959616e3
-
Lewis Baker authored
Summary: This should allow stack-traces for a chain of async work that was launched using blockingWait() to continue tracing the normal stack-frames of the caller of blockingWait(). Reviewed By: andriigrynenko Differential Revision: D24479522 fbshipit-source-id: e0604ed43edbd9df51daf679e0adf06d934a3ca6
-
Lewis Baker authored
Summary: Modify the AsyncScope::add() method so that it records the call-site of .add() as the first frame's return address instead of recording .add() itself as the first frame. This should hopefully give a bit more insight into where the detached task was launched. Reviewed By: andriigrynenko Differential Revision: D24478808 fbshipit-source-id: 0723891e77af5e52c7f8c13e218e4fb9120867e3
-