- 26 Oct, 2015 1 commit
-
-
Shijin Kong authored
Summary: Tested over weekend with D2571554. There was no EXC_RESOURCE/CPU crash when read errrors were returned on ENOTCONN. EAGAIN seems innocent as the spin detector was disabled on testing group. Patch folly. I can add #ifdef __APPLE__ around the errno checking code but this should be good practice for non apple code as well. I will remove debugging code in fbios master in another diff. Reviewed By: djwatson Differential Revision: D2580819 fb-gh-sync-id: 9162a3deba01af8b07cd2b336d7da3da040c67a9
-
- 24 Oct, 2015 1 commit
-
-
Nathan Bronson authored
Summary: AtomicUnorderedInsertMap's constructor takes a maxLoadFactor argument, which is given its default argument of 0.8f in all of our code. The clipping function that was supposed to prevent load factors greater than one was inverted, resulting in all of our code using a maxLoadFactor of 1 instead of 0.8. This diff fixes the computation, as well as changing all of the use sites so that the actual memory allocated by existing clients does not change. Reviewed By: yfeldblum Differential Revision: D2575238 fb-gh-sync-id: bb9dd8de53114236b259631d175d62af098391cf
-
- 23 Oct, 2015 3 commits
-
-
Jon Maltiel Swenson authored
Summary: Add a couple benchmarks measuring allocation/deallocation latency. One benchmark measures an allocate-deallocate repeated pattern, the other measures the allocation of a large chunk of fibers. We'll use these benchmarks later on after we modify the allocation/deallocation behavior of fibers. Reviewed By: pavlo-fb Differential Revision: D2573064 fb-gh-sync-id: 414eb93d6223e42c187c03214a47dfb533491bab
-
Bartosz Nitka authored
Summary: Some libraries like Haskell's `Data.Aeson` can produce arbitrarily big numbers with arbitrary precision. The json standard doesn't specify the ranges for numeric types. For interoperability, we should allow the user to parse the numbers with some loss of precision. Reviewed By: luciang Differential Revision: D2565140 fb-gh-sync-id: b1a9a46e298bf13cc89d7e79ce28705e9e251a7f
-
Nathan Bronson authored
Summary: AtomicUnorderedInsertMap used 32 bit index values internally. 2 bits were stolen, limiting the capacity to 2^30. This diff makes the internal index type a template parameter, so you can make really big maps if you want (at the expense of bigger map overhead). The easiest way is to substitute AtomicUnorderedInsertMap64. Reviewed By: yfeldblum Differential Revision: D2574338 fb-gh-sync-id: a74994b6da1046a149c2e7763c3dc19e35d9840b
-
- 22 Oct, 2015 3 commits
-
-
Alan Frindell authored
Summary: readTerminatedString could infinite loop if the terminator does not appear in the contained IOBuf chain and maxLength > chain.computeChainLength. I'm throwing out_of_range here because that more closely mirrors what the other read() functions do. Reviewed By: siyengar Differential Revision: D2571039 fb-gh-sync-id: 1db22089562d8767920d66a0a1b091b02de6571f
-
Giuseppe Ottaviano authored
Summary: Clang's `strlen` is not `constexpr`, but `__builtin_strlen` is, so we can have an unconditional `constexpr` `StringPiece` constructor. Reviewed By: luciang, yfeldblum Differential Revision: D2561782 fb-gh-sync-id: 51e76a0d50355cc5ead1148ba2389b640a6888de
-
Yaacov Akiba Slama authored
Summary: Tested in debian stretch when used in hhvm which can now run drupal 7. The compilation error is also fixed by #214 but this fix maintains forward declarations of basic_string and list. Closes https://github.com/facebook/folly/pull/329 Reviewed By: yfeldblum Differential Revision: D2533880 fb-gh-sync-id: 85e18eeeba9efa1b4150217ba526b32b5573e15e
-
- 21 Oct, 2015 5 commits
-
-
Philip Pronin authored
Summary: A few fields were swapped, and we had unintentionall fallthrough in switch. Reviewed By: luciang Differential Revision: D2565884 fb-gh-sync-id: 8ad71c090c5120e99c672f785aaefdef03469ee2
-
Rameshkumar Shihora authored
Summary: FingerprintBenchmark was in an internal directory before, but it belongs alongside the Fingerprint code. Reviewed By: yfeldblum Differential Revision: D2534646 fb-gh-sync-id: d8ded3a5a9d33f60e9674ea71dc87a2d8d19a51b
-
Andrii Grynenko authored
Reviewed By: elsteveogrande Differential Revision: D2517522 fb-gh-sync-id: eab11d17ce5db94e09aa733b6067e44d36be6345
-
Petr Lapukhov authored
Summary: as title, this comes handy when multiple consumers are needed within the same class. Reviewed By: has Differential Revision: D2530249 fb-gh-sync-id: 942761782a100b2d3fe54d94a7c1b0e03b95a847
-
Emil Hesslow authored
Summary: - I added this in PHP ( D2534138 ) so add it here too - This is my first folly diff so I probably done something wrong :) Reviewed By: yfeldblum Differential Revision: D2549168 fb-gh-sync-id: 5e6a80097be01fb54342e0c9da5b69465f695f80
-
- 20 Oct, 2015 1 commit
-
-
Jon Maltiel Swenson authored
Summary: Bring zstd support into folly/io/Compression.h Reviewed By: chipturner Differential Revision: D2551026 fb-gh-sync-id: 7c13338d45efb0fc19f0b44015c7e62d945a483b
-
- 17 Oct, 2015 2 commits
-
-
Bruno Goncalves authored
Summary: Boost is great, but c++11 incorporate some of their stuffs, and classes like ProducerConsumerQueue don't need it anymore. Closes https://github.com/facebook/folly/pull/321 Reviewed By: fredemmott, yfeldblum Differential Revision: D2519081 fb-gh-sync-id: b138a5af4662d1e7ef5e0823cf4001880ee02456
-
Ranjeeth Dasineni authored
Summary: If the eventFd goes bad, NotificationQueue consumers can cause their event loop to spin indefinitely. If libevent gets POLLERR on the fd, it calls handlerReady, which triggers a read. The read will fail, but the callback is never uninstalled. I'm not sure it would be easy to recover gracefully from this, so crash hard instead. Reviewed By: yfeldblum, pgriess Differential Revision: D2550270 fb-gh-sync-id: c9575fbda778b3625da6d9db6b0542b8263f230a
-
- 16 Oct, 2015 11 commits
-
-
Kyle Nekritz authored
Summary: AsyncSSLSocket.h change was not synced from D2408773 / f7176051. Test Plan: file matches D2408773 Reviewers: CC: Task ID: # Blame Rev:
-
Nathan Bronson authored
Summary: Make sure page size has been fetched from the operating system before it is used in asserts. Reviewed By: meyering Differential Revision: D2551368 fb-gh-sync-id: d3735571e2a45f613bbbd7e0f158a755d36b376c
-
Yedidya Feldblum authored
Summary: [Folly] Avoid the ODR issue with `ThreadLocalDetail`'s `kInvalid`. The problem is that it is a `static constexpr` class member, so pull it out of the class. Reviewed By: bmaurer Differential Revision: D2549272 fb-gh-sync-id: 28a73e73b9cf9f21bee2bba2125513c02ef56ce2
-
Madhu Ramanathan authored
Summary: This breaks buck build. Reverting till the fix is in to unblock build pipeline. Reviewed By: jmswen Differential Revision: D2550685 fb-gh-sync-id: 7623e6c7fcaad70d7d207ec10a59f7381c72cebc
-
Jon Maltiel Swenson authored
Summary: Bring ZSTD support into folly/io/Compression.h Reviewed By: chipturner Differential Revision: D2503151 fb-gh-sync-id: c1450cecc8197db654b7a080a63753caa666f686
-
Aaron Roth authored
Summary: There remained some derivations from boost::noncopyable in inner classes after boost/noncopyable.hpp was deleted in D2459355. Get rid of these two. Reviewed By: meyering Differential Revision: D2485930 fb-gh-sync-id: 89546490b15fa4279debf4b9cabcf48d3dc336bb
-
Mohammad Husain authored
Summary: Adding a callback to AsyncServerSocket to get notified of client connection events. This can be used for example to record stats about these events. Reviewed By: @afrind Differential Revision: D2544776 fb-gh-sync-id: 20d22cfc939c5b937abec2b600c10b7228923ff3
-
Lucian Grijincu authored
Reviewed By: @dcolascione Differential Revision: D2548486 fb-gh-sync-id: 6e2d7e84598eb5b05aba7a262b7c53532337dbe3
-
Lucian Grijincu authored
Reviewed By: @philippv, @dcolascione Differential Revision: D2548023 fb-gh-sync-id: d2b0571d5db03e38ed17a5de6a13d2194a05b2b9
-
Yedidya Feldblum authored
Summary: [Folly] Specialize and implement `setThreadName` only on some platforms. With this technique, we can compile setThreadName and programs that call it on MSVC/Windows and on other platforms that don't have the underlying pthread call. This is an alternative to: https://reviews.facebook.net/D46317. Reviewed By: @nbronson Differential Revision: D2535593 fb-gh-sync-id: 09d26f53e3fe69b49326b5b6492a7d59f86db2e8
-
Jody Ho authored
Summary: In some cases, folly::threadlocal_detail::StaticMeta<void>::EntryID::kInvalid is odr-used, a definition at the namespace scope is required even though it has been initialized with a brace-or-equal initializer. See http://en.cppreference.com/w/cpp/language/static Reviewed By: @yfeldblum Differential Revision: D2548668 fb-gh-sync-id: 9cd6d7b2f37d1481d1adbf4f0a2d9e66631efd15
-
- 15 Oct, 2015 4 commits
-
-
Kyle Nekritz authored
Summary: Added support for switching SSLContexts based on the signature_algorithms extension. This diff does not currently include any logic for determining which certs use SHA1 or not. Some thoughts: - This is a little scary since it defaults to SHA1 (assuming the client can't support SHA256 if we don't see SHA256 specifically in the hello extension). We need to be 100% sure that all clients that are going to reject SHA1 are sending this, and that we identify it correctly. - We should add logging to see when we think a client needs SHA1, when we actually give SHA1, etc. I'm not sure what the best way to do this is with our logging infrastructure. - This is not setup to serve any SHA1 certs to SHA256 supporting clients. Reviewed By: @siyengar Differential Revision: D2408773 fb-gh-sync-id: 48ad9cdfaae25e144c0964b9bfb1c342b137ffca
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: under GCC 4.9 + ASAN, `RangeSse42.cpp` fails to build. Reviewed By: @ldemailly, @meyering Differential Revision: D2544284 fb-gh-sync-id: fd50f8b326252291ad3a5d9fe956e7e647ad0133
-
Subodh Iyengar authored
Summary: Add api to get time taken to establish connections and to complete handshake for clients using AsyncSocket directly. Reviewed By: @afrind Differential Revision: D2435074 fb-gh-sync-id: f44c336e62c426736eb5b3d88dd57a18572382e8
-
Subodh Iyengar authored
Summary: Only include ephemeral ciphers in false start list. Reviewed By: @mzlee Differential Revision: D2429447 fb-gh-sync-id: 430d287a93249ff72b9ebe7db3bc283bb0712600
-
- 14 Oct, 2015 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: address some `maybe-uninitialized` warnings in `folly/test/StringTest.cpp`. Reviewed By: @meyering Differential Revision: D2535743 fb-gh-sync-id: fa6a071436d22169e2be69cec1abae19851657d2
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: address some `maybe-uninitialized` warnings in `folly/io/async/EventBase.cpp`. Reviewed By: @meyering Differential Revision: D2535753 fb-gh-sync-id: ff32f6957675d3b6d0267b1a59fb0c3aac4fe86e
-
- 13 Oct, 2015 7 commits
-
-
Orvid King authored
Summary: MSVC chokes on the template constraints of these functions, so use a single implementation that will be const-folded by the optimizer instead. Closes https://github.com/facebook/folly/pull/281 Reviewed By: @yfeldblum Differential Revision: D2419069 fb-gh-sync-id: c9ad3d135430f8265bbc90391b45d9295d6de362
-
Hans Fugal authored
Summary: This is a case of having to say what you're doing twice, and it's unnecessary. This change should not break anything as calling `std::move(lvalue)` where an lvalue reference is expected will just be superfluous. Reviewed By: @jsedgwick Differential Revision: D2534944 fb-gh-sync-id: fdcd168f369d95b0f28abe23b401b4321f51fc36
-
Nathan Bronson authored
Summary: Some LifoSem-s survive late into program execution, which means that destroying the IndexedMemPool that holds LifoSem waiter nodes can cause crashes during program shutdown. Reviewed By: @chadparry Differential Revision: D2536597 fb-gh-sync-id: c9b3b73b61f2b8bdcb00d03f4c6d3daf24b267c3
-
Orvid King authored
Summary: Because, especially with the way that munmap is implemented in my windows port, this is a very bad idea. Plus, it's completely unnecessary on Windows. Closes https://github.com/facebook/folly/pull/265 Reviewed By: @yfeldblum Differential Revision: D2283757 fb-gh-sync-id: 831c8aaad9bd5ad0fe091ea1e006814774d8a27c
-
Mohammad Husain authored
Reviewed By: @yfeldblum Differential Revision: D2534627 fb-gh-sync-id: 2934911b69542b4befa8dc03ec3cadb4a148496d
-
Ben Maurer authored
Summary: The thread local destructor was assuming that the singleton object had been created. Reviewed By: @yangchi Differential Revision: D2536166 fb-gh-sync-id: b0c08e0990f684c0afae054ee17c62a924260f2b
-
Lucian Grijincu authored
Summary: Include headers for all std:: stuff used in the header + getpid(). ``` #include <sys/types.h> #include <unistd.h> pid_t getpid(void); pid_t getppid(void); ``` Reviewed By: @yfeldblum Differential Revision: D2535284 fb-gh-sync-id: b1167e8f382878d27553161b9b569968006355b3
-