http2: safer Http2Session destructor · nodejs/node@0a8d086 · GitHub
Skip to content

Commit 0a8d086

Browse files
apapirovskiBethGriggs
authored andcommitted
http2: safer Http2Session destructor
It's hypothetically (and with certain V8 flags) possible for the session to be garbage collected before all the streams are. In that case, trying to remove the stream from the session will lead to a segfault due to attempting to access no longer valid memory. Fix this by unsetting the session on any streams still around when destroying. Backport-PR-URL: #22850 PR-URL: #21194 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
1 parent 3c8c53f commit 0a8d086

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/node_http2.cc

Lines changed: 9 additions & 8 deletions

0 commit comments

Comments
 (0)