[MPlayer-dev-eng] [PATCH] Fix crashes when pthread_create fails
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Mar 4 09:54:43 EET 2018
On 02.03.2018, at 15:34, Zhouyang Jia <jiazhouyang09 at gmail.com> 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
More information about the MPlayer-dev-eng
mailing list