Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#198 PSoundChannel: possible invalid reads on baseChannel

Unstable_(example)
closed-rejected
nobody
PTLib (107)
5
2012-05-25
2012-05-24
Anonymous
No

Hi Robert,

we had an issue, that very fast open and close calls on a PSoundChannel lead to Segmenation Faults in PSoundChannel::Close, where baseChannel was not null even though it was invalid due possible delete prior to the call of Close().

The patch seems to fix that issue, but I am not absolutely sure, although the issue never happened again.

Discussion

  • I am surprised the patch you supplied actually does anything. The mutex only protects against Open() being called from two different threads at the same time. The indicated crash in Close() could still happen as there is no mutex there to stop it.

    I have checked in a different solution.

     
    • status: open --> closed-rejected