Chromium Code Reviews
DescriptionRevert of Copy based on coded size in VideoTrackRecorder::VEAEncoder (patchset #2 id:40001 of https://codereview.chromium.org/2790443004/ )
Reason for revert:
Fails on msan.
https://build.chromium.org/p/chromium.memory.full/builders/Linux%20MSan%20Tests/builds/6793
==25314==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x173e79ea in vp8_intra4x4_predict third_party/libvpx/source/libvpx/vp8/common/reconintra4x4.c:64:3
#1 0x17411f49 in vp8_encode_intra4x4block third_party/libvpx/source/libvpx/vp8/encoder/encodeintra.c:55:3
#2 0x17080455 in pick_intra4x4block third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c:283:3
#3 0x17080455 in pick_intra4x4mby_modes third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c:313:0
#4 0x17083a01 in vp8_pick_intra_mode third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c:1425:14
#5 0x1740e0b4 in vp8cx_encode_intra_macroblock third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:1089:5
#6 0x1740b8f7 in encode_mb_row third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:458:21
#7 0x17406d89 in vp8_encode_frame third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:777:9
#8 0x17063469 in encode_frame_to_data_rate third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:3987:5
#9 0x17063469 in vp8_get_compressed_data third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:5098:0
#10 0x170280a7 in vp8e_encode third_party/libvpx/source/libvpx/vp8/vp8_cx_iface.c:879:25
#11 0x1704d1cc in vpx_codec_encode third_party/libvpx/source/libvpx/vpx/src/vpx_encoder.c:209:13
#12 0x16c10f29 in content::(anonymous namespace)::VpxEncoder::DoEncode(vpx_codec_ctx*, gfx::Size const&, unsigned char*, unsigned char*, int, unsigned char*, int, unsigned char*, int, base::TimeDelta const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) content/renderer/media_recorder/video_track_recorder.cc:932:7
#13 0x16c0da73 in content::(anonymous namespace)::VpxEncoder::EncodeOnEncodingTaskRunner(scoped_refptr<media::VideoFrame>, base::TimeTicks) content/renderer/media_recorder/video_track_recorder.cc:871:3
#14 0x16c12113 in Invoke<const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:214:12
#15 0x16c12113 in MakeItSo<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:285:0
#16 0x16c12113 in RunImpl<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const std::__1::tuple<scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks> &, 0, 1, 2> base/bind_internal.h:361:0
#17 0x16c12113 in base::internal::Invoker<base::internal::BindState<void (content::VideoTrackRecorder::Encoder::*)(scoped_refptr<media::VideoFrame>, base::TimeTicks), scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:339:0
#18 0xe0651e5 in Run base/callback.h:91:12
#19 0xe0651e5 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:59:0
#20 0xde5cbc3 in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:423:19
#21 0xde5e5b1 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:434:5
#22 0xde6015e in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:527:13
#23 0xde6d8d0 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:33:31
#24 0xde5bc46 in base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:387:10
#25 0xdede3fc in base::RunLoop::Run() base/run_loop.cc:37:10
#26 0xdf87aef in base::Thread::ThreadMain() base/threading/thread.cc:333:3
#27 0xdf70fb5 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:71:13
#28 0x7f49dc121183 in start_thread /build/eglibc-oGUzwX/eglibc-2.19/nptl/pthread_create.c:312:0
#29 0x7f49dbc3837c in clone /build/eglibc-oGUzwX/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111:0
Uninitialized value was stored to memory at
#0 0x1707f3e6 in pick_intra4x4block third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c:282:18
#1 0x1707f3e6 in pick_intra4x4mby_modes third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c:313:0
#2 0x17083a01 in vp8_pick_intra_mode third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c:1425:14
#3 0x1740e0b4 in vp8cx_encode_intra_macroblock third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:1089:5
#4 0x1740b8f7 in encode_mb_row third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:458:21
#5 0x17406d89 in vp8_encode_frame third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:777:9
#6 0x17063469 in encode_frame_to_data_rate third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:3987:5
#7 0x17063469 in vp8_get_compressed_data third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:5098:0
#8 0x170280a7 in vp8e_encode third_party/libvpx/source/libvpx/vp8/vp8_cx_iface.c:879:25
#9 0x1704d1cc in vpx_codec_encode third_party/libvpx/source/libvpx/vpx/src/vpx_encoder.c:209:13
#10 0x16c10f29 in content::(anonymous namespace)::VpxEncoder::DoEncode(vpx_codec_ctx*, gfx::Size const&, unsigned char*, unsigned char*, int, unsigned char*, int, unsigned char*, int, base::TimeDelta const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) content/renderer/media_recorder/video_track_recorder.cc:932:7
#11 0x16c0da73 in content::(anonymous namespace)::VpxEncoder::EncodeOnEncodingTaskRunner(scoped_refptr<media::VideoFrame>, base::TimeTicks) content/renderer/media_recorder/video_track_recorder.cc:871:3
#12 0x16c12113 in Invoke<const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:214:12
#13 0x16c12113 in MakeItSo<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:285:0
#14 0x16c12113 in RunImpl<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const std::__1::tuple<scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks> &, 0, 1, 2> base/bind_internal.h:361:0
#15 0x16c12113 in base::internal::Invoker<base::internal::BindState<void (content::VideoTrackRecorder::Encoder::*)(scoped_refptr<media::VideoFrame>, base::TimeTicks), scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:339:0
#16 0xe0651e5 in Run base/callback.h:91:12
#17 0xe0651e5 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:59:0
#18 0xde5cbc3 in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:423:19
#19 0xde5e5b1 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:434:5
#20 0xde6015e in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:527:13
#21 0xde6d8d0 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:33:31
#22 0xde5bc46 in base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:387:10
#23 0xdede3fc in base::RunLoop::Run() base/run_loop.cc:37:10
#24 0xdf87aef in base::Thread::ThreadMain() base/threading/thread.cc:333:3
#25 0xdf70fb5 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:71:13
Uninitialized value was stored to memory at
#0 0x6c3fcb in __msan_memcpy ??:0:0
#1 0x173dba76 in vp8_copy_mem16x16_c third_party/libvpx/source/libvpx/vp8/common/reconinter.c:28:5
#2 0x1740b0f7 in encode_mb_row third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:418:5
#3 0x17406d89 in vp8_encode_frame third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.c:777:9
#4 0x17063469 in encode_frame_to_data_rate third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:3987:5
#5 0x17063469 in vp8_get_compressed_data third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:5098:0
#6 0x170280a7 in vp8e_encode third_party/libvpx/source/libvpx/vp8/vp8_cx_iface.c:879:25
#7 0x1704d1cc in vpx_codec_encode third_party/libvpx/source/libvpx/vpx/src/vpx_encoder.c:209:13
#8 0x16c10f29 in content::(anonymous namespace)::VpxEncoder::DoEncode(vpx_codec_ctx*, gfx::Size const&, unsigned char*, unsigned char*, int, unsigned char*, int, unsigned char*, int, base::TimeDelta const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) content/renderer/media_recorder/video_track_recorder.cc:932:7
#9 0x16c0da73 in content::(anonymous namespace)::VpxEncoder::EncodeOnEncodingTaskRunner(scoped_refptr<media::VideoFrame>, base::TimeTicks) content/renderer/media_recorder/video_track_recorder.cc:871:3
#10 0x16c12113 in Invoke<const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:214:12
#11 0x16c12113 in MakeItSo<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:285:0
#12 0x16c12113 in RunImpl<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const std::__1::tuple<scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks> &, 0, 1, 2> base/bind_internal.h:361:0
#13 0x16c12113 in base::internal::Invoker<base::internal::BindState<void (content::VideoTrackRecorder::Encoder::*)(scoped_refptr<media::VideoFrame>, base::TimeTicks), scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:339:0
#14 0xe0651e5 in Run base/callback.h:91:12
#15 0xe0651e5 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:59:0
#16 0xde5cbc3 in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:423:19
#17 0xde5e5b1 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:434:5
#18 0xde6015e in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:527:13
#19 0xde6d8d0 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:33:31
#20 0xde5bc46 in base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:387:10
#21 0xdede3fc in base::RunLoop::Run() base/run_loop.cc:37:10
#22 0xdf87aef in base::Thread::ThreadMain() base/threading/thread.cc:333:3
#23 0xdf70fb5 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:71:13
#24 0x7f49dc121183 in start_thread /build/eglibc-oGUzwX/eglibc-2.19/nptl/pthread_create.c:312:0
Uninitialized value was stored to memory at
#0 0x6c3fcb in __msan_memcpy ??:0:0
#1 0x176380f4 in copy_and_extend_plane third_party/libvpx/source/libvpx/vp8/common/extend.c:38:5
#2 0x176380f4 in vp8_copy_and_extend_frame third_party/libvpx/source/libvpx/vp8/common/extend.c:73:0
#3 0x174262e5 in vp8_lookahead_push third_party/libvpx/source/libvpx/vp8/encoder/lookahead.c:139:5
#4 0x1705ceba in vp8_receive_raw_frame third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c:4817:7
#5 0x1702745a in vp8e_encode third_party/libvpx/source/libvpx/vp8/vp8_cx_iface.c:863:11
#6 0x1704d1cc in vpx_codec_encode third_party/libvpx/source/libvpx/vpx/src/vpx_encoder.c:209:13
#7 0x16c10f29 in content::(anonymous namespace)::VpxEncoder::DoEncode(vpx_codec_ctx*, gfx::Size const&, unsigned char*, unsigned char*, int, unsigned char*, int, unsigned char*, int, base::TimeDelta const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) content/renderer/media_recorder/video_track_recorder.cc:932:7
#8 0x16c0da73 in content::(anonymous namespace)::VpxEncoder::EncodeOnEncodingTaskRunner(scoped_refptr<media::VideoFrame>, base::TimeTicks) content/renderer/media_recorder/video_track_recorder.cc:871:3
#9 0x16c12113 in Invoke<const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:214:12
#10 0x16c12113 in MakeItSo<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const scoped_refptr<content::VideoTrackRecorder::Encoder> &, const scoped_refptr<media::VideoFrame> &, const base::TimeTicks &> base/bind_internal.h:285:0
#11 0x16c12113 in RunImpl<void (content::VideoTrackRecorder::Encoder::*const &)(scoped_refptr<media::VideoFrame>, base::TimeTicks), const std::__1::tuple<scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks> &, 0, 1, 2> base/bind_internal.h:361:0
#12 0x16c12113 in base::internal::Invoker<base::internal::BindState<void (content::VideoTrackRecorder::Encoder::*)(scoped_refptr<media::VideoFrame>, base::TimeTicks), scoped_refptr<content::VideoTrackRecorder::Encoder>, scoped_refptr<media::VideoFrame>, base::TimeTicks>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:339:0
#13 0xe0651e5 in Run base/callback.h:91:12
#14 0xe0651e5 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:59:0
#15 0xde5cbc3 in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:423:19
#16 0xde5e5b1 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:434:5
#17 0xde6015e in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:527:13
#18 0xde6d8d0 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:33:31
#19 0xde5bc46 in base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:387:10
#20 0xdede3fc in base::RunLoop::Run() base/run_loop.cc:37:10
#21 0xdf87aef in base::Thread::ThreadMain() base/threading/thread.cc:333:3
#22 0xdf70fb5 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:71:13
#23 0x7f49dc121183 in start_thread /build/eglibc-oGUzwX/eglibc-2.19/nptl/pthread_create.c:312:0
Uninitialized value was created by a heap allocation
#0 0x6c4363 in __interceptor_posix_memalign ??:0:0
#1 0xde417c9 in base::AlignedAlloc(unsigned long, unsigned long) base/memory/aligned_memory.cc:31:7
#2 0xfb569fd in media::VideoFrame::AllocateYUV(bool) media/base/video_frame.cc:1205:7
#3 0xfb4a6ef in media::VideoFrame::CreateFrameInternal(media::VideoPixelFormat, gfx::Size const&, gfx::Rect const&, gfx::Size const&, base::TimeDelta, bool) media/base/video_frame.cc:1064:10
#4 0xfb49db0 in media::VideoFrame::CreateFrame(media::VideoPixelFormat, gfx::Size const&, gfx::Rect const&, gfx::Size const&, base::TimeDelta) media/base/video_frame.cc:180:10
#5 0x5865ddd in content::VideoTrackRecorderTest_EncodeFrameWithPaddedCodedSize_Test::TestBody() content/renderer/media_recorder/video_track_recorder_unittest.cc:235:49
#6 0xd7f73cc in HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12
#7 0xd7f73cc in testing::Test::Run() testing/gtest/src/gtest.cc:2474:0
#8 0xd7f9cbb in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:11
#9 0xd7fb259 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28
#10 0xd81aefd in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43
#11 0xd819d8e in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12
#12 0xd819d8e in testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255:0
#13 0xb826860 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46
#14 0xb826860 in base::TestSuite::Run() base/test/test_suite.cc:271:0
#15 0xb848b7c in Run base/callback.h:80:12
#16 0xb848b7c in base::(anonymous namespace)::LaunchUnitTestsInternal(base::Callback<int (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, int, int, bool, base::Callback<void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) base/test/launcher/unit_test_launcher.cc:211:0
#17 0xb8483a6 in base::LaunchUnitTests(int, char**, base::Callback<int (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) base/test/launcher/unit_test_launcher.cc:453:10
#18 0x4f826f6 in main content/test/run_all_unittests.cc:20:10
#19 0x7f49dbb5ff44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287:0
Original issue's description:
> Copy based on coded size in VideoTrackRecorder::VEAEncoder
>
> This Cl addresses the below bug making sure that input frame's
> coded size is compared to VEA's requested and frame is copied
> when necessary.
>
> BUG=705273
> TEST=The given bug is fixed and added unittests.
>
> Review-Url: https://codereview.chromium.org/2790443004
> Cr-Commit-Position: refs/heads/master@{#460897}
> Committed: https://chromium.googlesource.com/chromium/src/+/68c20537e9ecd5715ffe280091c37fc6aa0a70f6
TBR=mcasas@chromium.org,emircan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=705273
Review-Url: https://codereview.chromium.org/2785393002
Cr-Commit-Position: refs/heads/master@{#460975}
Committed: https://chromium.googlesource.com/chromium/src/+/87a9033a234d53a98dd6f803c192877fd342a2c1
Patch Set 1 #
Messages
Total messages: 6 (3 generated)
|
||||||||||||||||||||||||||||