- 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 12 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
-
Igor Sugak authored
Summary: Fix a few `-Wsign-compare` violations Reviewed By: @meyering Differential Revision: D2527969 fb-gh-sync-id: 140acbd06eedf2e2a315e1927b331ff5efb20d0f
-
Igor Sugak authored
Summary: Make folly `-Wpessimizing-move` clean: Common errors: ```lang=bash folly/io/test/NetworkBenchmark.cpp:71:30: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] unique_ptr<IOBuf> next = std::move(head->pop()); ^ folly/io/IOBufQueue.cpp:153:28: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] appendToChain(head_, std::move( ^ folly/IPAddressV6.cpp:341:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move] return std::move(ip); ^ folly/IPAddressV6.cpp:341:12: note: remove std::move call here return std::move(ip); ^~~~~~~~~~ ~ 1 error generated. ``` Reviewed By: @fugalh, @meyering Differential Revision: D2526950 fb-gh-sync-id: 49291a8b49905eb9b2042d004830ff2f599dfbd3
-
Woo Xie authored
Summary: current wangle has no way to close socket write side. writeFlags is extended so that wangle/AsyncSocketHandler can distinguish closeNow(), closeWithReset() and shutdownWrite() Reviewed By: @viswanathgs Differential Revision: D2522056 fb-gh-sync-id: 60616176d78311a4a09f9761a6ccda01dd502a88
-
Ben Maurer authored
Summary: Right now ThreadLocal & friends don't operate correctly when used as a static variable (which is the idiomatic way to use them). The TLS id is allocated in the static constructor so anybody who uses the ID prior to first use would use an invalid ID. This makes ThreadLocal unusable for core code such as per-thread reference counting. This diff allocates the ID on first use. By making the invalid ID maxint we avoid adding any extra branches in the fast path. We can then make the constructor a constexpr meaning that initialization will happen prior to any code running. Reviewed By: @meyering Differential Revision: D2457989 fb-gh-sync-id: 21d0c0d00c638fbbd36148d14d4c891f66f83706
-
Ben Maurer authored
Summary: objdump was showing that the shiftXXX tables are being generated each time this file is included. For example, HHVM has about 200 of each of the 4 tables. Since each one is 512 bytes this is 400 KB. I'm not quite sure why this was happening -- I'd think that the linker would combine a constant table that was identical. I think the best thing to do here is just to use extern template. This way you there's only one copy of the table and you don't have to parse all of this code in every file Reviewed By: @yfeldblum Differential Revision: D2506571 fb-gh-sync-id: b01a522c536a2ff4136340245cacaa33897afefb
-