- 31 Dec, 2019 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Delegate `#include <jemalloc/jemalloc.h>` to the portability header. Reviewed By: interwq Differential Revision: D19254447 fbshipit-source-id: f07ac46e65313cbe5b9b7ba3df139978fad83b33
-
- 30 Dec, 2019 1 commit
-
-
Rosen Penev authored
Summary: Found with readability-container-size-empty Signed-off-by: Rosen Penev <rosenp@gmail.com> Pull Request resolved: https://github.com/facebook/folly/pull/1293 Reviewed By: markisaa Differential Revision: D19241094 Pulled By: yfeldblum fbshipit-source-id: 9362e8dc5dc1458fcd2b27c11ce81eafe674bcd2
-
- 29 Dec, 2019 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Apply `clang-format` in places. Reviewed By: markisaa Differential Revision: D19249033 fbshipit-source-id: 1a768eea013112ee5cd9d8b78114927fd6d6db04
-
Yedidya Feldblum authored
Summary: [Folly] Apply python formatting to a few unsynced places in some `.pyi` files. Reviewed By: markisaa Differential Revision: D19249037 fbshipit-source-id: 6b14c5fedbee0f25a4b0fdfdd0f157e62a95a766
-
- 28 Dec, 2019 3 commits
-
-
James Donald authored
Reviewed By: yfeldblum Differential Revision: D19235483 fbshipit-source-id: 5caea4efb3e811f78f1be3f05adc315bccb0fc0d
-
Rosen Penev authored
Summary: Found with modernize-use-equals-default Signed-off-by: Rosen Penev <rosenp@gmail.com> Pull Request resolved: https://github.com/facebook/folly/pull/1291 Reviewed By: markisaa Differential Revision: D19229643 Pulled By: yfeldblum fbshipit-source-id: 69f0bd4f55ea5a3697ab176aab80683b99b4e11c
-
Yedidya Feldblum authored
Summary: [Folly] Return spelled default ctor in `AlignedSysAllocator` - it is necessary until gcc7. Reviewed By: LeeHowes Differential Revision: D19235864 fbshipit-source-id: fd0e9c33283e8b646aff56efb10d8e2a8c05e293
-
- 26 Dec, 2019 2 commits
-
-
Igor Sugak authored
Summary: I'd like to enable UBSAN's unsigned-integer-overflow check. It's not an undefined behavior, but it is often unintentional. This adds suppressions to folly/hash where unsigned-integer-overflow is expected due the the nature of operations. Reviewed By: yfeldblum Differential Revision: D19217819 fbshipit-source-id: 1a468018823e0ac1d01c3ae889e38e9d42bdd8b7
-
Yedidya Feldblum authored
Summary: [Folly] Cut some outdated lines in docs and comments which refer to no-longer supported versions of gcc. Reviewed By: Orvid Differential Revision: D19229059 fbshipit-source-id: c8abb81c292091339622e9cc3d4e5fd3cd6459b4
-
- 25 Dec, 2019 6 commits
-
-
Rosen Penev authored
Summary: libcxx does not have strcmp or strlen as constexpr. Signed-off-by: Rosen Penev <rosenp@gmail.com> Pull Request resolved: https://github.com/facebook/folly/pull/1288 Reviewed By: Orvid Differential Revision: D19226813 Pulled By: yfeldblum fbshipit-source-id: 4b5de4f923f4d7871c059af54eb7d375f344f48a
-
Yedidya Feldblum authored
Summary: [Folly] Use `getCurrentThreadName()` in `EventBaseTestLib.h` v.s. using pthread directly. Reviewed By: Orvid Differential Revision: D19226856 fbshipit-source-id: 90f825ab0fc186a896cd63c425e55153daa0fefd
-
Yedidya Feldblum authored
Summary: [Folly] Update a comment in `CacheLocalityBenchmark.cpp` to refer to the direct function used for fetching the thread-id. Reviewed By: Orvid Differential Revision: D19226855 fbshipit-source-id: 8cf203daa7b3fbc00e387dca881be7f9ce47af95
-
Yedidya Feldblum authored
Summary: [Folly] Use `std::thread` in `AtomicHashMapTest.cpp` instead of using the pthread API. In general in normal C++ code, prefer C++ standard library facilities over C facilities. Reviewed By: Orvid Differential Revision: D19226850 fbshipit-source-id: 7edc5fca25266b48ab3e8c8829708594d7563409
-
Joe Loser authored
Summary: - EventBaseTestLib.cpp file was moved to EventBaseTestLibProvider.cpp in Differential Revision: D19001877. - Change CMakeLists.txt to specify EventBaseTestLibProvider.cpp so that CMake does not fail at configure time due to EventBaseTestLib.cpp not existing in the source tree. Pull Request resolved: https://github.com/facebook/folly/pull/1284 Reviewed By: markisaa Differential Revision: D19226798 Pulled By: yfeldblum fbshipit-source-id: 45a5e5ca03a52897a6f8f711761bf78ef386e6f6
-
Yedidya Feldblum authored
Summary: [Folly] Fix typo in `clang-format` control. Reviewed By: markisaa Differential Revision: D19224383 fbshipit-source-id: 1d153fb4eaead422d93c235e40163b8ae855d13a
-
- 24 Dec, 2019 2 commits
-
-
Giuseppe Ottaviano authored
Summary: It's a read-only interface. Reviewed By: philippv, luciang Differential Revision: D19199710 fbshipit-source-id: 5e900edd35640cded45e6376eb0b81b9036bd792
-
Giuseppe Ottaviano authored
Summary: It can be useful for diagnostics to print the stack traces of thrown exceptions that are not yet handled, for example if a fatal error happens during unwinding. Reviewed By: philippv, luciang Differential Revision: D19191089 fbshipit-source-id: dae8cc0a095570bfe7d6c4c7ef2b5dc08aa9f1f9
-
- 21 Dec, 2019 7 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Let `AtFork` accept ptr-to-`const` handle rather than requiring only ptr-to-non-`const`. Reviewed By: luciang Differential Revision: D19208255 fbshipit-source-id: c7a6ab42b7b652ebc4ea6465f80db37ef1d155df
-
Yedidya Feldblum authored
Summary: [Folly] Rename `object` to `handle` in `AtFork` since it is used opaquely. Reviewed By: luciang Differential Revision: D19208246 fbshipit-source-id: 3fc23e85b64f911f8e172a22f7e7080952d4dfe9
-
Yedidya Feldblum authored
Summary: [Folly] Register with `AtFork` without an object in `BufferedRandomDevice`, since no object is actually needed and since it is possible for the object passed in to be destroyed. Reviewed By: luciang Differential Revision: D19207385 fbshipit-source-id: 7c0e2793d9b438e576bf26bc3b3b459b372aec6d
-
Yedidya Feldblum authored
Summary: [Folly] Let `AtFork` ignore unregistration of `nullptr` objects - i.e., let `nullptr` objects be the way of signaling immunity from unregistration. Reviewed By: luciang Differential Revision: D19207380 fbshipit-source-id: 6dfee52bf815fc257697fb89d67f69cede0f39f6
-
Yedidya Feldblum authored
Summary: [Folly] Define `to_narrow` in terms of implicit conversion to take advantage of ubsan's truncation checks. Note that integer truncation is not undefined behavior per se but is commonly unintended, so ubsan checks for it. Uses of `to_narrow` should not be subject to truncation; wherever truncation is anticipated, better to use an explicit conversion with a named destination type. Requires suppressing `-Wconversion` around the implicit conversion to avoid extraneous warnings and errors when the compiler detects narrowing implicit conversions. Since `to_narrow` models explicit conversion while merely being defined in terms of implicit conversion, it is already anticipated by all users that a narrowing conversion may occur; the warning is there to inform users only about unanticipated cases. Reviewed By: luciang Differential Revision: D19201430 fbshipit-source-id: b3739d3d9aa05e95f7b3e4dff54e719691c1f04c
-
Yedidya Feldblum authored
Summary: [Folly] Mark `co_error` as `final`. Reviewed By: lewissbaker Differential Revision: D19173904 fbshipit-source-id: 3dedf9a27629dd495d7097d00566a92753b65778
-
Yedidya Feldblum authored
Summary: [Folly] Forbid `co_error` with empty `exception_wrapper`. Reviewed By: lewissbaker Differential Revision: D19172250 fbshipit-source-id: 5ffa7502eb97b6a084be3112b17f29bad2d96a0f
-
- 20 Dec, 2019 7 commits
-
-
Rosen Penev authored
Summary: Found with modernize-loop-convert Signed-off-by: Rosen Penev <rosenp@gmail.com> Pull Request resolved: https://github.com/facebook/folly/pull/1260 Reviewed By: markisaa Differential Revision: D18747876 Pulled By: yfeldblum fbshipit-source-id: f2b19654bb3fcbb75b1210edeef536c88f3052d1
-
Yedidya Feldblum authored
Summary: [Folly] Let `PriorityUnboundedQueueSet` align its queues, which have extended alignment, even when `std::allocator` does not honor extended alignment. Reviewed By: magedm Differential Revision: D19174993 fbshipit-source-id: 0bc0d75c6d239c97b6e1c7380bffff0363008e16
-
Yedidya Feldblum authored
Summary: [Folly] Let AlignedSysAllocator consider the natural or specified alignment of the type for which memory is being allocated, rather than only considering a constant or fixed alignment. Reviewed By: nbronson Differential Revision: D19174932 fbshipit-source-id: e8ed0fbaf30d285cadd061d0fe5d69fcbb16f9e2
-
Tristan Rice authored
Summary: The tagged/specific exception variant of thenError and deferError propagate interrupts where currently the untagged variant of thenError does not. As far as I can tell this was an oversight. This makes untagged thenError behave as expected. Reviewed By: yfeldblum, mpark Differential Revision: D18643814 fbshipit-source-id: 42688c4363de2f6b027766b19276b2e8ec6a48a8
-
Yedidya Feldblum authored
Summary: [Folly] Remove spelled default ctor in `AlignedSysAllocator`, which was needed only for gcc49. Reviewed By: aary Differential Revision: D19171223 fbshipit-source-id: ee42f6ac188dc896519537870353116c0dfd3acd
-
Yedidya Feldblum authored
Summary: [Folly] Extended constructibility for `co_error` - constructible from everything `exception_wrapper` is constructible from, but not default-constructible. This permits: ```lang=c++ co_yield folly::coro::co_error(std::runtime_error("foo")); ``` Reviewed By: lewissbaker Differential Revision: D19172210 fbshipit-source-id: df21c4f2a15ad2286e7cb34aae7c1be05e797a94
-
Yedidya Feldblum authored
Summary: [Folly] Avoid a too-large pointer literal in StlVectorTest, keeping the literal value divisible by 8 to avoid ubsan violations. Reviewed By: igorsugak Differential Revision: D19170467 fbshipit-source-id: 2c93d2b3d9f7515761668d3364c4b8b5093a6145
-
- 19 Dec, 2019 6 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Only use `explicit` copy-ctor in `to_narrow` with C++17 and higher, since C++17 introduces mandatory copy elision and the technique here relies on mandatory copy elision. Differential Revision: D19175384 fbshipit-source-id: 9d3234a71b1b5e4f31d14137e42dbf3a73c79b2e
-
Lilit Yenokyan authored
Summary: Fixing warning exposed by -Wpointer-bool-conversion ``` folly/container/test/F14MapTest.cpp:1370:35: error: address of function 'Tracked<0>::counts' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] << "key_type ops " << Tracked<0>::counts << ", mapped_type ops " ~~ ^~~~~~~~~~~~~~~~~~ folly/container/test/F14MapTest.cpp:1370:35: note: prefix with the address-of operator to silence this warning << "key_type ops " << Tracked<0>::counts << ", mapped_type ops " ^ & folly/container/test/F14MapTest.cpp:1371:16: error: address of function 'Tracked<1>::counts' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] << Tracked<1>::counts; ~~ ^~~~~~~~~~~~~~~~~~ folly/container/test/F14MapTest.cpp:1371:16: note: prefix with the address-of operator to silence this warning << Tracked<1>::counts; ^ & 2 errors generated. Reviewed By: yfeldblum Differential Revision: D19131722 fbshipit-source-id: 9db48848ab5d68bc73ab0d6a4ef557d0db05414e
-
Yedidya Feldblum authored
Summary: [Folly] Extract `has_extended_alignemnt`. Reviewed By: aary Differential Revision: D19149753 fbshipit-source-id: c6fa5cf2adcab732a21fbb31ab8ab60e978b9bc8
-
Yedidya Feldblum authored
Summary: [Folly] Canonical impl of futures `Core::removeStaleDependents` using std algorithms. Reviewed By: leikahing, igorsugak Differential Revision: D19167292 fbshipit-source-id: 702fdf07bdcc295ed990d2c02cd3380ea81694a2
-
Mark Williams authored
Summary: In cores we're only interested in the ElfPhdrs (and there generally aren't any sections), so apart from some asserts, the code already does everything we need. Reviewed By: paulbiss Differential Revision: D19161810 fbshipit-source-id: fe6e2f34413d61067156858fc652ffffd910433c
-
Igor Sugak authored
Summary: Exposed by UBSAN's misaligned-pointer-use: ```lang=bash > folly/test/stl_tests/StlVectorTest.cpp:544:12: runtime error: upcast of misaligned address 0x0000feebdaed for type 'DataTracker<false>', which requires 8 byte alignment > 0x0000feebdaed: note: pointer points here > <memory cannot be printed> > #0 0x6c9b93 in DataTracker<false>::~DataTracker() folly/test/stl_tests/StlVectorTest.cpp:544 > #1 0x6c94fe in Data<0u, 0ul>::~Data() folly/test/stl_tests/StlVectorTest.cpp:605 > #2 0xcc5f93 in void test_iteratorInsertionN2<folly::fbvector<Data<0u, 0ul>, std::allocator<Data<0u, 0ul> > > >(std::integral_constant<bool, true>) folly/test/stl_tests/StlVectorTest.cpp:2422 > #3 0x5c9bac in void test_iteratorInsertionN3<folly::fbvector<Data<0u, 0ul>, std::allocator<Data<0u, 0ul> > > >() folly/test/stl_tests/StlVectorTest.cpp:2422 > #4 0x5c67bd in FBVector_iteratorInsertionN_Test::TestBody() folly/test/stl_tests/StlVectorTest.cpp:2422 > #5 0x7f9c4e5316c9 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:2464 > #6 0x7f9c4e530dcc in testing::Test::Run() xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:2480 > #7 0x7f9c4e5350a0 in testing::TestInfo::Run() xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:2662 > #8 0x7f9c4e539408 in testing::TestCase::Run() xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:2780 > #9 0x7f9c4e55a672 in testing::internal::UnitTestImpl::RunAllTests() xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:4655 > #10 0x7f9c4e5595de in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:2464 > #11 0x7f9c4e558b72 in testing::UnitTest::Run() xplat/third-party/gmock/googletest-1.8.0/googletest/src/gtest.cc:4263 > #12 0x6591f3 in RUN_ALL_TESTS() buck-out/cells/fbsource/gen/xplat/third-party/gmock/gtest_headers#header-mode-symlink-tree-with-header-map,headers/gtest/gtest.h:2247 > #13 0x659139 in main folly/test/stl_tests/StlVectorTest.cpp:3074 > #14 0x7f9c4c75b1a5 in __libc_start_main /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/csu/libc-start.c:308:16 > #15 0x4de029 in _start /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/sysdeps/x86_64/start.S:120 > > SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use folly/test/stl_tests/StlVectorTest.cpp:544:12 ``` Make the crafted pointer address aligned. Reviewed By: Gownta Differential Revision: D19166262 fbshipit-source-id: f766656d031079350838598b135275bdbc047642
-
- 18 Dec, 2019 3 commits
-
-
Matt Ma authored
Summary: Not sure if there is any predefined cross-platform macro that I can use the detect the build mode. Reviewed By: luciang Differential Revision: D19161841 fbshipit-source-id: 49dd12096ab20bbcaada566f2ad854a9ea340c11
-
Yedidya Feldblum authored
Summary: [Folly] Canonical implementation of `IoUringBackend::NotAvailable` - need to export exceptions since they are the most likely use-case for RTTI and can just bring the base class's ctors into scope. Differential Revision: D19154080 fbshipit-source-id: efaf9440a5ec3d78201448160efe4b8893314956
-
Andrii Grynenko authored
Reviewed By: yfeldblum, lewissbaker Differential Revision: D19156701 fbshipit-source-id: 80bd8b7fc6dfde71756411342e5f4eb912150f06
-