Comments (5)
Well, the signature throw_io_failure(std::string, bool)
would do as well. Though, I cannot see a bug in the code. I'll have a closer look at this next week.
from actor-framework.
Well, the "Invalid read" isn't repeating, so this is some corner case, but '&&' shouldn't be used in the normal code if I read c++ FAQs correctly.
from actor-framework.
The &&
just binds to an rvalue reference argument. Because the argument is named, it is an lvalue inside the function body. Removing it only broadens the interface, i.e., it will be up to the caller to decide whether to incur a move or copy. (IIRC, it would be a glvalue then, whereas it is an rvalue right now.) Without having run the code, it does not look like the culprit to me.
The only issue I see with the above code snippet is that std::ios_base::failure
does not have an rvalue constructor, so you could change
throw std::ios_base::failure(std::move(tmp));
to
throw std::ios_base::failure(tmp);
from actor-framework.
Indeed, throw std::ios_base::failure(std::move(tmp));
seems to be the line the stack trace is pointing to.
Maybe this cast of tmp
to rvalue is messing things for some compilers?
from actor-framework.
Even after reviewing the code again, I don't see a problem with the code. Looks like either a compiler bug or false alarm of valgrind to me. Nevertheless, I have revised the implementation and changed it to make use of std::ostringstream instead of concatenate the string by hand. This makes the implementation both shorter and should fix the strange behavior you're observing.
from actor-framework.
Related Issues (20)
- json_builder issue HOT 1
- Heap-use-after-free in blocking_actor test suite
- configuration options for length field of length prefix framing HOT 2
- Regression in caf::io::spawn_client HOT 2
- Fix log severity when disposing connection acceptors
- Investigate frequent failures of caf-robot-stream-octet
- Investigate tests not running in some distros
- "http/client" example does not dispose of the connections after completing request
- Why is my request from a scoped_actor timing out when using the deterministic fixture? HOT 3
- Doxygen: much of the documentation has seemingly vanished HOT 6
- Websocket client closes the connection HOT 2
- Build errors with clang using c++23
- Crash in `run_actions` when calling `quit`
- Proposal: equivalent to `caf::json*` but for XML? HOT 5
- Possible bug/issue with flow_bridge_base::prepare_send() HOT 3
- Cannot run recent examples with vcpkg package HOT 2
- How to encapsulate a calculator to only provide a C function interface? HOT 3
- More broken Doxygen output
- print.hpp: Control characters not escaped correctly HOT 7
- missing close-frame when shutting down websocket server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actor-framework.