[vlc-devel] [PATCH] securetransport: Protect reading/writing with a mutex

Rémi Denis-Courmont remi at remlab.net
Sun Oct 8 11:32:59 CEST 2017


Le torstaina 5. lokakuuta 2017, 21.52.51 EEST Marvin Scholz a écrit :
> On 5 Oct 2017, at 20:05, Rémi Denis-Courmont wrote:
> > Le torstaina 5. lokakuuta 2017, 9.04.12 EEST Marvin Scholz a écrit :
> >> Secure Transport reading/writing is not thread safe, doing it from
> >> different threads results in memory corruption and other
> >> unpredictable
> >> behavior.
> > 
> > Concurrent st_Send() would still corrupt data given how the
> > would-block error
> > is handled.
> > 
> > But VLC does not require re-entrant send or re-entrant receive. It
> > only
> > requires that one thread can send while another thread receives (and
> > vice
> > versa).
> 
> I realize my patch description was a bit unclear. The intention
> of the lock was to prevent that Send and Receive can happen
> concurrently,
> as it seems this is not supported by the Secure Transport library.

That could be but it should be ascertained before merging the patch (and in 
that case, consider clarifying the description).

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list