- 02 Oct, 2019 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Dead Code: `PriorityMPMCQueue`. Reviewed By: LeeHowes Differential Revision: D17718372 fbshipit-source-id: c79c376abadf7149b94d343cd6705f030fd71666
-
Yedidya Feldblum authored
Summary: [Folly] `down_cast` for polymorphic checked-in-debug down-casts. Reviewed By: nbronson Differential Revision: D17650399 fbshipit-source-id: 9cdd224b3f97ba40f88013877f968ed311a3ab3c
-
Mingtao Yang authored
Summary: SSL_CTX_get_cipher_list() has different semantics when running under OpenSSL 1.1.1. This adjusts the tests that explicitly call SSLContext::setCiphers() to only check expectations against < TLS 1.3 cipher names. Reviewed By: knekritz Differential Revision: D17539611 fbshipit-source-id: c293bd1e6b886dbc575a0677a98776d256b23fb5
-
Rosen Penev authored
Summary: X509_get0_notBefore returns and takes const parameters. Signed-off-by: Rosen Penev <rosenp@gmail.com> ping reanimus Pull Request resolved: https://github.com/facebook/folly/pull/1235 Test Plan: Build Reviewed By: knekritz Differential Revision: D17695324 Pulled By: reanimus fbshipit-source-id: bebdb11fc9dd0b49354e7efcd1adc4f87a6675bc
-
- 01 Oct, 2019 6 commits
-
-
Maged Michael authored
Summary: Fix missing null check. It is possible for a thread to successfully CAS count from >= threshold to 0 and also pop an empty list. Example with 2 threads: - Batch contains Threshold - 1 objects - Thread 1 pushes an object, finds count == Threshold, CAS-es count to 0 successfully. - Thread 2 pushes Threshold more objects, finds count == Threshold, CAS-es count to 0 successfully. - Thread 1 pops all 2xThreshold objects (that's ok) - Thread 2 pops 0 objects (that's ok too but we need to do null check before dereferencing the head of the list). Reviewed By: davidtgoldblatt Differential Revision: D17680391 fbshipit-source-id: a1d68997668077cc0b34cc66405628ed2f95702b
-
Taewook Oh authored
Summary: According to https://github.com/jemalloc/jemalloc/issues/237 and https://fburl.com/aeia78qk, `__attribute__((nothrow))` is added to jemalloc API functions to be in compatible with `stdlib.h`. Reviewed By: yfeldblum Differential Revision: D17679036 fbshipit-source-id: 525a076f19719d2406c0dce92ca814f5f5011497
-
Adam Simpkins authored
Summary: Add a manifest to download pexpect-4.7.0 from PyPI, as well as its ptyprocess dependency. Reviewed By: wez Differential Revision: D17669618 fbshipit-source-id: 13395ec07f503f39adb3dc5aa8d0c2d8d0f1d927
-
Adam Simpkins authored
Summary: Correctly emit dependency information when one Python package depends on another. Reviewed By: wez Differential Revision: D17669620 fbshipit-source-id: f51c7851470fe50dc0c17263c94c4d858d6e0921
-
Yedidya Feldblum authored
Summary: [Folly] Assorted nits. Reviewed By: chadaustin Differential Revision: D17677721 fbshipit-source-id: a5903a61059cd60e093423d087b9e1d7e9e5d443
-
Yedidya Feldblum authored
Summary: [Folly] `aligned` and `cacheline_aligned`, aligned and implicitly padded value wrapper types. Reviewed By: nbronson Differential Revision: D17386115 fbshipit-source-id: 6da33a4d97f40ada59682e02af9d56863ccaff3d
-
- 30 Sep, 2019 10 commits
-
-
Igor Sugak authored
Summary: ``` s/safer to safer to log/safer to log/ ``` Reviewed By: yfeldblum Differential Revision: D17629820 fbshipit-source-id: 8f9c3e412dfe52664ac1ae45e521f7df8815cef1
-
Brian Bustamante authored
Summary: Allow propagation of completing executor KA in order to permit inlining Reviewed By: LeeHowes Differential Revision: D17123836 fbshipit-source-id: 7524868284f9482f56e5b8cd8b9e33bc4212de74
-
Luca Niccolini authored
Reviewed By: dddmello Differential Revision: D17642516 fbshipit-source-id: 5e9820df831fd907c97fab1238b38712ce2f6e64
-
wez@fb.com authored
Summary: Add a `--mode=tests` behavior for invoking `ctest` Reviewed By: simpkins Differential Revision: D17610033 fbshipit-source-id: 6284fe1dbfb7adf38a67820c842a5531eefd72fa
-
wez@fb.com authored
Summary: Add a function for defining Python unit tests. This creates the test executable, and also emits logic to perform test discovery for ctest. Reviewed By: simpkins Differential Revision: D17610034 fbshipit-source-id: cdf15b0b04acc1d3e906a1e2a95eb327951176ba
-
wez@fb.com authored
Summary: Export a property that indicates the path to the test executable. This is useful for callers that want to install the binary or run it from other CMake rules. Reviewed By: simpkins Differential Revision: D17647146 fbshipit-source-id: b32e2694e44a07d7c234e53a7a5c8443cb144487
-
Fred Emmott authored
Summary: This is a little strange: we already build with the system GCC on Debian 9 (Stretch), which is GCC 6.3 - but these changes are needed on other distributions when building GCC 6.3 verbatim from upstream. fixes facebook/folly#823 Reviewed By: jjergus Differential Revision: D17533036 fbshipit-source-id: 32f7d1dc1fb9af3a89fe628185c0b239203e86d5
-
Ming Zhao authored
Add terminateOrKill function to folly::Subprocess to use a combination of SIGTERM/SIGKILL to terminate a process. Summary: Add terminateOrKill function to folly::Subprocess to use a combination of SIGTERM/SIGKILL to terminate a process. The document has clearly indicated this class is thread-unsafe, and it's strongly suggested to call signal and wait in the same thread to avoid unintended consequence, yet there is code that tried to do that in mutliple threads and ends with potential kill(-1). By providing a function that basically does `terminate(); waitpid_with_timeout(); kill(); waitpid()`, it should help eliminate usage errors mentioned above. Reviewed By: yfeldblum Differential Revision: D17662349 fbshipit-source-id: 3a68ede5ca09270f804c88839a798ae31b615ae3
-
Yedidya Feldblum authored
Summary: [Folly] Fix cmake rule for `JsonOtherTest.cpp`, which should no longer have an associated `CONTENT_DIR`. Reviewed By: Orvid Differential Revision: D17649973 fbshipit-source-id: dc703884e1ccb5cad008cbb54acb24028570b126
-
REDMOND\acoates authored
Summary: Newest builds of MSVC have a few more builtin's supported, so those polyfills need to be removed when using newer builds of MSVC. Pull Request resolved: https://github.com/facebook/folly/pull/1234 Reviewed By: Orvid Differential Revision: D17649918 Pulled By: yfeldblum fbshipit-source-id: 6c0fbd25bc77000228439a2ad1d66c815cb9f2c1
-
- 29 Sep, 2019 2 commits
-
-
Aditya Kumar authored
Reviewed By: yfeldblum Differential Revision: D17651558 fbshipit-source-id: 7c4ed2a5fbe2ddd843dc3b5f5eb53c87438197f0
-
Aditya Kumar authored
Reviewed By: gunnarku Differential Revision: D17631777 fbshipit-source-id: 0d7aef0804f6ab85c5e1bdc4460d6357af0dc0e1
-
- 28 Sep, 2019 1 commit
-
-
James Kay authored
Summary: The variables written to `libfolly.pc` by CMake may contain generator expressions, in which case `libfolly.pc` ends up containing them verbatim. This adds a postprocessing stage in which the variables are evaluated to yield the final `libfolly.pc`. Pull Request resolved: https://github.com/facebook/folly/pull/1232 Reviewed By: simpkins Differential Revision: D17637013 Pulled By: yfeldblum fbshipit-source-id: d1cc2d3322fe7b15bfff4a99a246dcc6e267a0ba
-
- 27 Sep, 2019 4 commits
-
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D17619144 fbshipit-source-id: 2d0c533fbf55b4ce1cfc787f53711fd1864a03c6
-
Udip Pant authored
Summary: Allows us to set IPV6_PMTUDISC_PROBE See http://man7.org/linux/man-pages/man7/ip.7.html for reference Reviewed By: yfeldblum Differential Revision: D17624135 fbshipit-source-id: 46c1e71c768a0a7d0fbab5b728ba5df1b2f781b3
-
Maged Michael authored
Summary: This diff avoids locking and traversing the domain's tagged list on shutdown of batches that never pushed objects to the list. This change required batches to keep track of pushing objects to the domain's tagged list. This in turn required reclamation of tagged objects to be invoked by the batch rather than using the free function hazptr_cleanup_batch_tag. In order to avoid batches keeping track of the associated domain (and adding an extra field), batches are used only with the default domain. Reviewed By: davidtgoldblatt Differential Revision: D17416380 fbshipit-source-id: e5a3cd1492c1f1daf499b44fa1cfb4bb822062f7
-
Aditya Kumar authored
Summary: Reduce calls to string::operator+. Constructing a single string by precalculating the size. Reviewed By: yfeldblum Differential Revision: D17573761 fbshipit-source-id: 3918d1774949873fab3ba702d47cdeb80b44ab1d
-
- 26 Sep, 2019 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] No need to load test files at runtime in json test - just embed the content into the test source as usual. Reviewed By: vitaut Differential Revision: D17578929 fbshipit-source-id: 65b0bb7fe94f03b3defa9c539c2837c341e042c3
-
Jason Gauci authored
Reviewed By: yfeldblum Differential Revision: D17556725 fbshipit-source-id: 693ab8a2288584d3a05298790b6289483814e895
-
- 25 Sep, 2019 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix stack-use-after-scope in `folly::json::serialize` internals in `std::sort` comparison in `Printer::printObject`. Also avoid an extra layer of indirection around the comparison function. Possibly useful because the function is called repeatedly within the loop. Fixes #1190. Reviewed By: vitaut Differential Revision: D17560072 fbshipit-source-id: 787584dc1f7d70762a712869788f8d892dd19ed5
-
Andrew Krieger authored
Summary: There's already some ifdef for _WIN32 but it's not consistent. Also nothing ever sets the define for the supported functions to 0, so bail on those. Reviewed By: yfeldblum Differential Revision: D17559767 fbshipit-source-id: d0eebea980ef4f2b1288bdcc39547453efd3e9be
-
- 24 Sep, 2019 4 commits
-
-
Ezequiel Gomez authored
Summary: Add new helper method setCiphersuites to folly SSLOptions. Same behavior as the templated setCipherSuites that takes in a TSLOptions. Instead of getting the ciphersuites from the static TSLOptions::ciphers(), this method allows use caller to pass in the ciphersuite list. Reviewed By: mingtaoy Differential Revision: D17432484 fbshipit-source-id: 8a08b3651e209b5a4dfe4eca2352a9042206a48a
-
Shoaib Meenai authored
Summary: It's possible, but not required, for platforms to support alignment requirements greater than std::max_align_t. For example, on some 32-bit platforms (e.g. iPhone armv7), std::max_align_t is only 4, but std::atomic<unsigned long long> has an alignment requirement of 8. Check for alignment at runtime instead of compile time to avoid spurious static assertion failures. Reviewed By: nbronson Differential Revision: D17488704 fbshipit-source-id: 54cd7c2d7aec4f7f93e5fa6d62f8237f66a6c018
-
John Strizich authored
Summary: this adds `oss-openr-linux-getdeps` to diffs affecting files under openr. With soma going away and the old fbcode_builder job disabled, this will give us the signal we need to keep the cmake build healthy. [Some Info on Getdeps](https://our.intern.facebook.com/intern/wiki/Test_your_Open_Source_build_with_getdeps.py/) Michael, this change may require you to bump up some of the dependent libraries and build them with cmake if not already. The main changes to the cmake script are around using package configs instead of `find_library` Also, for those with more CMake experience: since there are some big changes in the `CmakeLists`, feel free to pour on more suggestions on how I could make it better and more aligned with other facebook OSS Reviewed By: saifhhasan Differential Revision: D16010068 fbshipit-source-id: 66f914f1971f826e0868c4130839380639a7e44b
-
Yedidya Feldblum authored
Summary: [Folly] Add missing `template` qualification in `FunctionRef`. Comparable sites in `Function` include the `template` qualification. Reviewed By: LeeHowes Differential Revision: D17521726 fbshipit-source-id: 350fd0c2944508fb653239d637516d099184330d
-
- 23 Sep, 2019 2 commits
-
-
Lee Howes authored
Summary: Clarifying doc blocks. Reviewed By: lbrandy Differential Revision: D17527404 fbshipit-source-id: 4f5c83a94b511082379d8bbbfea6d37a908bc860
-
Nathan Bronson authored
Summary: The current version of libc++ deallocates the existing capacity when calling operator=(initializer_list), even if the map is empty. This diff relaxes the expectations of F14's allocated memory tests (which fall back to the underlying STL std::unordered_map on some platforms) to accept this implementation. Reviewed By: shixiao Differential Revision: D17527441 fbshipit-source-id: 01da55aaeb6f8328e093251b026052dac365f7b2
-
- 22 Sep, 2019 1 commit
-
-
Yedidya Feldblum authored
Summary: There is a build failure with some versions of MSVC. Backing out the change while investigating. Reviewed By: lhuang04 Differential Revision: D17520392 fbshipit-source-id: ee63795ff78c5ac638fc97a9db632437436fb758
-
- 21 Sep, 2019 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Optimize `Function::operator()` codegen for size and speed. * Avoid translating between values and references for trivially-copyable values. * Avoid shifting all arguments to make room for the function object address. In the optimal case, the codegen for calling a `Function` with many arguments translates into just a `jmp`. See: * https://github.com/thecppzoo/zoo/commits/master/inc/zoo/AnyCallable.h * https://github.com/bloomberg/bde/blob/3.38.0.1/groups/bsl/bslstl/bslstl_function.h * https://github.com/bloomberg/bde/blob/3.38.0.1/groups/bsl/bslmf/bslmf_forwardingtype.h Given this example code: ```lang=c++,name=check.cpp extern "C" void check_0(folly::Function<void()>& f) { f(); } extern "C" void check_1(int i, folly::Function<void(int)>& f) { f(i); } extern "C" void check_2(int i, int j, folly::Function<void(int, int)>& f) { f(i, j); } extern "C" void check_3(int i, int j, int k, folly::Function<void(int, int, int)>& f) { f(i, j, k); } extern "C" void check_4(int i, int j, int k, int l, folly::Function<void(int, int, int, int)>& f) { f(i, j, k, l); } ``` Before: ```name=check.o 0000000000000000 <check_0>: 0: ff 67 30 jmp QWORD PTR [rdi+0x30] 0000000000000000 <check_1>: 0: 55 push rbp 1: 48 89 f0 mov rax,rsi 4: 48 89 e5 mov rbp,rsp 7: 48 83 ec 10 sub rsp,0x10 b: 89 7d fc mov DWORD PTR [rbp-0x4],edi e: 48 8d 75 fc lea rsi,[rbp-0x4] 12: 48 89 c7 mov rdi,rax 15: ff 50 30 call QWORD PTR [rax+0x30] 18: c9 leave 19: c3 ret 0000000000000000 <check_2>: 0: 55 push rbp 1: 48 89 d0 mov rax,rdx 4: 48 89 e5 mov rbp,rsp 7: 48 83 ec 10 sub rsp,0x10 b: 89 7d f8 mov DWORD PTR [rbp-0x8],edi e: 89 75 fc mov DWORD PTR [rbp-0x4],esi 11: 48 8d 55 fc lea rdx,[rbp-0x4] 15: 48 8d 75 f8 lea rsi,[rbp-0x8] 19: 48 89 c7 mov rdi,rax 1c: ff 50 30 call QWORD PTR [rax+0x30] 1f: c9 leave 20: c3 ret 0000000000000000 <check_3>: 0: 55 push rbp 1: 48 89 c8 mov rax,rcx 4: 48 89 e5 mov rbp,rsp 7: 48 83 ec 10 sub rsp,0x10 b: 89 7d f4 mov DWORD PTR [rbp-0xc],edi e: 89 75 f8 mov DWORD PTR [rbp-0x8],esi 11: 89 55 fc mov DWORD PTR [rbp-0x4],edx 14: 48 8d 4d fc lea rcx,[rbp-0x4] 18: 48 8d 55 f8 lea rdx,[rbp-0x8] 1c: 48 8d 75 f4 lea rsi,[rbp-0xc] 20: 48 89 c7 mov rdi,rax 23: ff 50 30 call QWORD PTR [rax+0x30] 26: c9 leave 27: c3 ret 0000000000000000 <check_4>: 0: 55 push rbp 1: 4c 89 c0 mov rax,r8 4: 48 89 e5 mov rbp,rsp 7: 48 83 ec 10 sub rsp,0x10 b: 89 7d f0 mov DWORD PTR [rbp-0x10],edi e: 89 75 f4 mov DWORD PTR [rbp-0xc],esi 11: 89 55 f8 mov DWORD PTR [rbp-0x8],edx 14: 89 4d fc mov DWORD PTR [rbp-0x4],ecx 17: 4c 8d 45 fc lea r8,[rbp-0x4] 1b: 48 8d 4d f8 lea rcx,[rbp-0x8] 1f: 48 8d 55 f4 lea rdx,[rbp-0xc] 23: 48 8d 75 f0 lea rsi,[rbp-0x10] 27: 48 89 c7 mov rdi,rax 2a: ff 50 30 call QWORD PTR [rax+0x30] 2d: c9 leave 2e: c3 ret ``` After: ```name=check.o 0000000000000000 <check_0>: 0: ff 67 30 jmp QWORD PTR [rdi+0x30] 0000000000000000 <check_1>: 0: ff 66 30 jmp QWORD PTR [rsi+0x30] 0000000000000000 <check_2>: 0: ff 62 30 jmp QWORD PTR [rdx+0x30] 0000000000000000 <check_3>: 0: ff 61 30 jmp QWORD PTR [rcx+0x30] 0000000000000000 <check_4>: 0: 41 ff 60 30 jmp QWORD PTR [r8+0x30] ``` Reviewed By: mpark, ericniebler, ot, luciang Differential Revision: D17416587 fbshipit-source-id: cdb76314197f8979339e31435fff997a46f48f1c
-
- 20 Sep, 2019 1 commit
-
-
Adam Simpkins authored
Summary: This updates fbcode_builder to try and automatically detect the current repository's project name by looking for a `.projectid` file in the repository root. If the project name can be detected: - The current repository will automatically be used as the source directory for this project (instead of fetching the sources into the scratch directory). - If an explicit project name was not specified on the command line, the current project will be built by default. This also changes the repository detection logic to use the current working directory, rather than the directory where the fbcode_builder code lives. This will allow this logic to work even if we move fbcode_builder into its own repository in the future, and have projects depend on it using git submodules. This does mean that callers need to invoke fbcode_builder.py from inside the repository. Reviewed By: wez Differential Revision: D17088938 fbshipit-source-id: f14d28fdcfaa330ff837ea52b8bdd4e358b81c61
-