Re: [PATCH] Fix crashes when pthread_create fails

Reimar Döffinger <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>

On 02.03.2018, at 15:34, Zhouyang Jia <[email protected]> wrote:

> Hi,
> 
> I'm a PhD student. I analyzed the mplayer source code and found
> pthread_create missing error handling in several places, which may
> cause bad results like crash.
> 
> I think it's unsafe to assume the library function would be correct.
> It would be better if we could handle the error properly.

I haven't checked the surrounding code so I might definitely be wrong, but I find it unlikely that just returning 0 will result in correct error handling.
I'd expect som memory deallocation and error handling in higher level function would be necessary, did you check?
Or trigger the error paths manually and run in valgrind?

Thanks for the patch either way though!

Regards,
Reimar Döffinger
_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.