Opened 5 years ago

Last modified 4 months ago

#8169 open defect

Data race from ff_mpeg_update_thread_context in libavcodec/mpegvideo.c

Reported by: Suhwan Owned by:
Priority: normal Component: avcodec
Version: unspecified Keywords: mpegvideo tsan
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
There're data race bugs from ff_mpeg_update_thread_context in libavcodec/mpegvideo.c:510:9 and from mpeg4_update_thread_context in libavcodec/mpeg4videodec.c:3463:5.

How to reproduce:

% ./ffmpeg_g -y -i avi+mpeg4+mp2++PTS_DTS_Order_Prob.avi -target dv50 -loglevel 0 -map 0 -aframes 85 -r 101 -ac 20 -b:v 90k -strict 3 output/tmp.srt

ffmpeg version N-94943-g1db6e47e85 Copyright (c) 2000-2019 the FFmpeg developers
  built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
  configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug --toolchain=clang-tsan

Attachments (2)

tsan_report (231.8 KB ) - added by Suhwan 5 years ago.
avi+mpeg4+mp2++PTS_DTS_Order_Prob.avi (425.2 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (4)

by Suhwan, 5 years ago

Attachment: tsan_report added

by Suhwan, 5 years ago

poc

comment:1 by mkver, 2 years ago

Component: undeterminedavcodec
Keywords: mpegvideo added
Status: newopen

The data race in mpeg4_update_thread_context() has been fixed in 577ba4a1af08f47d1a2f0d175092f770a1d897c8.

comment:2 by Cosmin Stejerean, 4 months ago

This specific data race may have been fixed, but there are other data races in mpegvideo.c, see #10567

Note: See TracTickets for help on using tickets.