-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream_base: dispatch reqs in the stream impl #1558
Conversation
@indutny into v1.x? Shouldn't this target master and then be backported? |
Yeah, right. I'm bad at this thing. |
Dispatch requests in the implementation of the stream, not in the code creating these requests. The requests might be piled up and invoked internally in the implementation, so it should know better when it is the time to dispatch them. In fact, TLS was doing exactly this thing which led us to... Fix: nodejs#1512
Make sure that no WriteItem's callback will be invoked synchronously. Doing so may lead to the use of uninitialized `req` object, or even worse use-after-free in the caller code. Fix: nodejs#1512
#1512 looks to be fixed with the last commit, probaby best to run another CI now. I think this fix may have to go in without a test, unless someone has an idea. |
I'll probably do it a better way... will reopen this PR to target a master branch. |
Does the target branch really matter? With our manual merge process, it shouldn't have any significance :) |
@silverwind means the CI will work properly. (see #1560) |
Dispatch requests in the implementation of the stream, not in the code
creating these requests. The requests might be piled up and invoked
internally in the implementation, so it should know better when it is
the time to dispatch them.
In fact, TLS was doing exactly this thing which led us to...
Fix: #1512