[Asterisk-code-review] chan pjsip: segfault on already disconnected session (asterisk[13])

Joshua Colp asteriskteam at digium.com
Wed Oct 19 09:41:24 CDT 2016


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/4142 )

Change subject: chan_pjsip: segfault on already disconnected session
......................................................................


Patch Set 1:

The session_end_completion task is queued up when we are told that the INVITE session is disconnected. At this point in time the INVITE session is still valid and undestroyed. If the INVITE session reference is incremented there then it is guaranteed to remain valid and undestroyed until the session is ended, after which there should be no other tasks.

Even with your current change how does incrementing the INVITE session outside of the monitor thread guarantee it? The monitor thread could result in the count going to 0 and destroying, while the thread queueing up answer/indicate/update_connected_line then increments it back to 1 if I'm understanding correctly.

Are we queueing up answer/indicate/etc AFTER we have executed the session_end_completion task?

-- 
To view, visit https://gerrit.asterisk.org/4142
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2e3e2f75358cdb530252a9ce158af3d5d9fdf33
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list