- 01 Mar, 2018 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Cut build config items for `bits/functexcept.h`. Folly no longer uses the non-portable functions declared in that internal libstdc++ header. Reviewed By: mzlee Differential Revision: D7119064 fbshipit-source-id: 6879dc6a5bc490726b188d65d7686a2eca136980
-
Lee Howes authored
Summary: Removing calls to folly::Promise::getFuture from Future-inl.h's simpler cases. Replacing with getSemiFuture. In the case of the collect variants I continue to return a Future, completing inline, until those functions are modified to return SemiFuture. Reviewed By: yfeldblum Differential Revision: D7103938 fbshipit-source-id: 3737887a934cd0fe8f7c1511ae2ba252ea047a49
-
Joe Loser authored
Summary: Some OSes do not define `IP_MTU_DISCOVER` or `IPV6_MTU_DISCOVER`. As such, this would result in the function argument parameter `df` being unused, which is a warning that is then treated as an error. Earlier today (2806dda4), this logic was added about setting the DF which broke Mac builds. Closes https://github.com/facebook/folly/pull/791 Reviewed By: igorsugak Differential Revision: D7116863 Pulled By: yfeldblum fbshipit-source-id: 5092891c8977a44ab58723f8cef352dd4eaa1210
-
- 28 Feb, 2018 8 commits
-
-
Igor Sugak authored
Summary: Exposed by UBSAN: {P59121025} {P59121310} {P59121558} Add appropriate checks to avoid the UB. Reviewed By: yfeldblum Differential Revision: D7112776 fbshipit-source-id: 82bd9f85ed4c82aa1b030a38d6ad9358e8f2d38a
-
Yang Chi authored
Summary: Some application requires IP not to fragment the the datagram. Add an API to AsyncUDPSocket to set such option. Reviewed By: siyengar Differential Revision: D5421406 fbshipit-source-id: 6cd3ab262f1420e22eb0948e0e2bfef77b7b6e92
-
Joe Loser authored
Summary: Introduce a specialization for `std::vector<bool>` as the existing specialization for "other ranges" is not sufficient for binding the proxy iterator (`bit_const_reference`) to an lvalue when iterating over the `vector<bool>`. I do not think you can simply change the type from `const auto&` to `auto&&` when iterating over the container for the "other ranges" specialization. This is because we cannot bind an rvalue to an lvalue reference (which is the function argument type for our `construct` specializations). See #752 and https://github.com/facebook/folly/pull/756 for more info. Closes https://github.com/facebook/folly/pull/781 Reviewed By: andrewjcg Differential Revision: D7078659 Pulled By: yfeldblum fbshipit-source-id: 0089183a3c68d20ed14e483859e950dfb4ae729e
-
Joe Loser authored
Summary: Add a find_package module for Snappy Closes https://github.com/facebook/folly/pull/783 Reviewed By: simpkins Differential Revision: D7079554 Pulled By: yfeldblum fbshipit-source-id: bf5dc3f3c37367f43fcbf8b40aaa3bb0a030bee5
-
Xiao Shi authored
Summary: Previously, there are a number of tests in `FBVectorTestBenchmarks.cpp.h` that are not used anywhere. This diff separates out the tests from the benchmarks and actually include them in `FBVectorTest.cpp`. Reviewed By: yfeldblum Differential Revision: D7103453 fbshipit-source-id: 9427bb1ddcebefb2bbd2c91707fdd572890dc42e
-
Mingtao Yang authored
Summary: getOpenSSLNumericVersion was not static, while getOpenSSLLongVersion() was. Rather than change it to static, these functions should simply be free functions. Reviewed By: yfeldblum Differential Revision: D7094066 fbshipit-source-id: 808a9d169100c9d94d466d9348418a4e8a50c751
-
Yedidya Feldblum authored
Summary: [Folly] Tweak throw_exception condition, fixing reference to `__GNUC__` and restructuring to make adding checks for alternative compilers more trivial. Reviewed By: mzlee Differential Revision: D7102307 fbshipit-source-id: e4e00ded71f37db8fa93822744b608b42960a58a
-
Enji Cooper authored
Reviewed By: yfeldblum Differential Revision: D7091797 fbshipit-source-id: cbba7e5c17e1b6d4446570fb7a2b888db8bcd17e
-
- 27 Feb, 2018 4 commits
-
-
Dave Watson authored
Summary: Re-committing. Original: D6993857 revert: D7051998 Fixes for hazptr deletion on map destruction. Several iteration cases don't properly release their hazard pointers. This isn't disastrous, but means objects may stick around longer than necessary. Adds tests and fixes for iteration to ensure we eagerly reset all hazard pointers. Reviewed By: yfeldblum Differential Revision: D7063727 fbshipit-source-id: 2ae32ead4965b37866096d2a8c6ea8c42c201335
-
Yedidya Feldblum authored
Summary: [Folly] Let `to_signed` be `constexpr` under C++11 rules. Reviewed By: simpkins Differential Revision: D7079545 fbshipit-source-id: 69a56f2180f9ec3492cd1ad9cd26dd8bba255442
-
Joe Loser authored
Summary: CMake find_package modules are case sensitive. Since the script is called "FindLZ4.cmake" the corresponding call to `find_package` must match LZ4 and not "lz4". For an example of the problem, see the [Travis Log](https://travis-ci.org/facebook/folly/jobs/345661072). Namely: ``` CMake Warning at CMake/folly-deps.cmake:101 (find_package): No "Findlz4.cmake" found in CMAKE_MODULE_PATH. Call Stack (most recent call first): CMakeLists.txt:65 (include) CMake Warning (dev) at CMake/folly-deps.cmake:101 (find_package): Findlz4.cmake must either be part of this project itself, in this case adjust CMAKE_MODULE_PATH so that it points to the correct location inside its source tree. ``` This was not caught on my local machine as I use case-insensitive options in my terminal; in addition, this is not a "hard error" for CMake, so the builds happily continued successfully when 7dc5a4ed landed. Closes https://github.com/facebook/folly/pull/782 Reviewed By: simpkins Differential Revision: D7079535 Pulled By: yfeldblum fbshipit-source-id: dd51d8c6ffa804be72c2d9cd264890280dcf5ab9
-
Yedidya Feldblum authored
Summary: [Folly] Cut `folly/portability/BitsFunctexcept.h`. Reviewed By: simpkins Differential Revision: D7066504 fbshipit-source-id: ed260ab36759a58dee103addd92c6a5a47dac330
-
- 26 Feb, 2018 2 commits
-
-
Neel Goyal authored
Summary: Add DECLARE/DEFINE_uint32 to the portability layer Reviewed By: yfeldblum Differential Revision: D7085534 fbshipit-source-id: 3f6f1bf79371b052706f4b3a03dca1d503b879da
-
Nathan Bronson authored
Summary: folly::dynamic's operator[] was documented as never invalidating iterators. In the object case when a key is implicitly inserted the underlying unordered_map can rehash, which does invalidate the iterators. This diff amends the comment to reflect this case. Reviewed By: yfeldblum Differential Revision: D7085861 fbshipit-source-id: 41ce0497bc60dba9f4529d10010f3b92f9a6c2b3
-
- 25 Feb, 2018 1 commit
-
-
Joe Loser authored
Summary: Adds a find_package module for Zstd. Closes https://github.com/facebook/folly/pull/785 Reviewed By: pixelb Differential Revision: D7080036 Pulled By: yfeldblum fbshipit-source-id: 018ff087df725de5344a245dea64ce1b813f6938
-
- 24 Feb, 2018 4 commits
-
-
David Lai authored
Summary: We are going to enable `-Werror=unused-parameter` flag and I need to manually fix some files so we rest of this process can be automated with a tool called clang-tidy. Reviewed By: yfeldblum Differential Revision: D7071617 fbshipit-source-id: 0165d9c79834b479ad0f598ea64404a86f47dcc6
-
Yedidya Feldblum authored
Summary: [Folly] `to_signed` and `to_unsigned`, for casting a value to the signed or unsigned version of the value's type. And use them in time conversion functions. Reviewed By: markw65 Differential Revision: D7020215 fbshipit-source-id: 47a6aeeea487cd7d59d23e7ded40cc66dcc57c52
-
Yedidya Feldblum authored
Summary: [Folly] `throw_exception` to support `-fno-exceptions`, switching all invocations of `std::__throw_....`. Removes the need to use the non-portable `bits/functexcept.h`. Reviewed By: mzlee, ot Differential Revision: D7050335 fbshipit-source-id: 53d15639baa268a51f703816f04f314454d64979
-
Joe Loser authored
Summary: This test suite used to wrap equality of two paths by using `EXPECT_TRUE` to avoid an old bug in GTest 1.6.0. Now that we use GTest 1.8.0, we can simplify our test. Closes https://github.com/facebook/folly/pull/780 Differential Revision: D7052503 Pulled By: yfeldblum fbshipit-source-id: 5459736fca04cc45acf88a3d7dffc855ad7c9376
-
- 23 Feb, 2018 6 commits
-
-
Xiao Shi authored
Summary: format changes, purely generated by clang-format. Differential Revision: D7035579 fbshipit-source-id: 8452e1613adefe7dcfbbed4a3ef97be681790416
-
Kyle Nekritz authored
Summary: Packing the structs disregards the alignment of the storage. We should only do this on platforms where we do not need alignment. Reviewed By: yfeldblum Differential Revision: D7058593 fbshipit-source-id: 63b0d86bcf8b4f660ca244b1a4696e3ca64ecd6a
-
Kyle Nekritz authored
Reviewed By: yfeldblum Differential Revision: D7060959 fbshipit-source-id: 914c517b4c8e93c15771f6acefaddce3138776a4
-
Joe Loser authored
Summary: Add a CMake find_package script for LZ4 simpkins Closes https://github.com/facebook/folly/pull/778 Reviewed By: simpkins Differential Revision: D7064988 Pulled By: yfeldblum fbshipit-source-id: 60596ead4b4fd38474dab4c33d4c3fbb0f37549c
-
Joe Loser authored
Summary: Clang does not support the warning option "-Wclobbered", so we cannot do a pragma push and pop for this warning. So, we push and pop this particular warning for GCC only. As it stands currently, Clang accepts `#pragma GCC` directives. If this sort of thing comes up more in the future, it may make sense for Folly to define a macro for easily disabling warnings for either just GCC or just Clang. simpkins yfeldblum Closes https://github.com/facebook/folly/pull/779 Reviewed By: simpkins Differential Revision: D7059916 Pulled By: yfeldblum fbshipit-source-id: a6d420dc6ae435e3be1229b2bb421910bc8794ff
-
Maged Michael authored
Summary: Clear hazard pointers in ~hazptr_array() and ~hazptr_local(). Added tests to detect uncleared hazard pointers when using hazptr_array and hazptr_local. Differential Revision: D6995057 fbshipit-source-id: 5b8fa1d197c3959ed670d0a019959bd57f5df3d0
-
- 22 Feb, 2018 6 commits
-
-
Igor Sugak authored
Reviewed By: igorsugak fbshipit-source-id: 4a93675cc1931089ddd574cacdb15d228b1e5f37
-
Krishna Monian authored
Summary: Since sysfs doesn't have cache information for the CPU on Android guard this on Android Reviewed By: yfeldblum Differential Revision: D7051199 fbshipit-source-id: 20fcfa91aa2f642c6cab33b0fb55f121b609d58f
-
David Lai authored
Reviewed By: everiq, igorsugak Differential Revision: D7046710 fbshipit-source-id: 8e10b1f1e2aecebbfb229c742e214db887e5a461
-
Alex Dibert authored
Summary: This allows to create a Channel with AsyncSSLSocket while evb in not looping yet. Also add ssl channel tests to thrift. Reviewed By: yfeldblum Differential Revision: D6991017 fbshipit-source-id: 0852b18e03a6b9d072cb4ec0182f1a41a5960eef
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/experimental/hazptr/` under gcc7, which has a bug in emitting TLS init functions for `extern thread_local` variables. Fixes: ``` folly/experimental/hazptr/test/HazptrTest.cpp:642: error: undefined reference to 'TLS init function for folly::hazptr::tls_priv_data_' folly/experimental/hazptr/test/HazptrTest.cpp:642: error: undefined reference to 'TLS init function for folly::hazptr::tls_priv_data_' ``` The trick is to use a template class with `static thread_local` members with member definitions in the same header, and then to use only one instance of that template class. Reviewed By: pixelb, magedm Differential Revision: D7047235 fbshipit-source-id: 0551179a40f13796d6c0bb99aa806c73bd9dd471
-
Andrey Malevich authored
Summary: Original commit changeset: bee63b3f597d. Original revision is breaking integration tests by failing with the SIGSEGV in operator++, please check D6993857 for more details. Reviewed By: anshulverma Differential Revision: D7051998 fbshipit-source-id: e5cfbb22aee5f5ec9871a9a34bb27eb5b0036d1b
-
- 21 Feb, 2018 6 commits
-
-
Dave Watson authored
Summary: Fixes for hazptr deletion on map destruction. Several iteration cases don't properly release their hazard pointers. This isn't disastrous, but means objects may stick around longer than necessary. This diff adds tests and fixes for iteration to ensure we eagerly reset all hazard pointers. Reviewed By: magedm Differential Revision: D6993857 fbshipit-source-id: bee63b3f597d1ed16cae5ed22a971fd4be2e1a77
-
Kenny Yu authored
Summary: If a pthread_rwlock_t shared mutex is currently write-locked, we can find its owner. However, if it is not write-locked or read-locked (possibly by multiple threads), we will be unable to find the owner. We can extend our deadlock detector to find deadlocks involving write-locked pthread_rwlock_t mutexes as well. Example output: Type "deadlock" to detect deadlocks. (gdb) deadlock Found deadlock! Thread 2 (LWP ...) is waiting on pthread_mutex_t (0x...) held by Thread 3 (LWP ...) Thread 3 (LWP ...) is waiting on pthread_rwlock_t (0x...) held by Thread 2 (LWP ...) Reviewed By: yfeldblum Differential Revision: D6974509 fbshipit-source-id: 8e64cb35f93958a9785070184df4c818b086ff0f
-
Adam Simpkins authored
Summary: The install step for folly CMake-based builds installs a folly-config.cmake file that downstream projects can use to depend on folly in their own CMakeLists.txt files. CMakeLists.txt was previously generating the folly-config.cmake file by copying CMake/folly-deps.cmake. This seems wrong, as the installed folly-config.cmake file should not contain `find_package()` statements that depend on CMake modules only available in the folly source. This adds a new folly-config.cmake.in template instead. Reviewed By: yfeldblum Differential Revision: D7035992 fbshipit-source-id: e6023094a807cf481ac49998c6f21b213be6c288
-
Adam Simpkins authored
Summary: When compiling with optimization enabled, gcc 7.2 complains about the `childDir` variable potentially being clobbered by the child process after `vfork()`. This shouldn't matter since `childDir` is only used in the child process, and not in the parent after the `vfork()`. Reviewed By: yfeldblum Differential Revision: D7035993 fbshipit-source-id: c80a4e18ad4f629a3d08e310cfd4500ebaf70994
-
Adam Simpkins authored
Summary: gcc does not complain about unknown `-Wno-*` flags by default, and older versions of gcc do not support `-Werror=unknown-warning-option`. Therefore these checks for `-Wno-noexcept-type` and `-Wno-nullability-completeness` could incorrectly indicate that the compiler supports these flags. This changes the checks to check against the positive version of the warning flag. Reviewed By: yfeldblum Differential Revision: D7035995 fbshipit-source-id: b1511d31721aeb779859848e20820c8a7fea4faa
-
Joe Loser authored
Summary: This brings us closer to being able to compile the open source version of Folly with Clang. There are a few other open pull requests that need to be addressed to allow us to compile on Clang without any warnings that aren't already explicitly disabled. See pull requests #745 and #756. Closes https://github.com/facebook/folly/pull/772 Reviewed By: simpkins Differential Revision: D7021595 Pulled By: yfeldblum fbshipit-source-id: 350b972c74502ca2bc147f21428c622b19805b89
-