Closed Bug 1649311 Opened 4 years ago Closed 4 years ago

null pointer passed as argument 2, which is declared to never be null in media/webrtc/trunk/webrtc/modules/include/module_common_types.h

Categories

(Core :: WebRTC: Audio/Video, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox79 --- wontfix
firefox80 --- fixed

People

(Reporter: tsmith, Assigned: dminor)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This can be triggered with mochitests. To enable this check add the following to your mozconfig:
ac_add_options --enable-undefined-sanitizer="nonnull-attribute"

INFO - TEST-START | dom/media/tests/mochitest/identity/test_peerConnection_asymmetricIsolation.html

src/media/webrtc/trunk/webrtc/modules/include/module_common_types.h:189:37: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:47:28: note: nonnull attribute specified here
    #0 0x7f55ecdc567c in webrtc::RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader(unsigned long) src/media/webrtc/trunk/webrtc/modules/include/module_common_types.h:189:9
    #1 0x7f55f50807e9 in webrtc::VP8EncoderImpl::GetEncodedPartitions(webrtc::TemporalLayers::FrameConfig const*, webrtc::VideoFrame const&) src/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc:901:15
    #2 0x7f55f507fa2b in webrtc::VP8EncoderImpl::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::vector<webrtc::FrameType, std::allocator<webrtc::FrameType> > const*) src/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc:859:13
    #3 0x7f55f4ff6a0c in webrtc::VCMGenericEncoder::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::vector<webrtc::FrameType, std::allocator<webrtc::FrameType> > const&) src/media/webrtc/trunk/webrtc/modules/video_coding/generic_encoder.cc:95:20
    #4 0x7f55f5041319 in webrtc::vcm::VideoSender::AddVideoFrame(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*) src/media/webrtc/trunk/webrtc/modules/video_coding/video_sender.cc:340:17
    #5 0x7f55f514dbef in webrtc::VideoStreamEncoder::EncodeVideoFrame(webrtc::VideoFrame const&, long) src/media/webrtc/trunk/webrtc/video/video_stream_encoder.cc:827:17
    #6 0x7f55f51548aa in webrtc::VideoStreamEncoder::EncodeTask::Run() src/media/webrtc/trunk/webrtc/video/video_stream_encoder.cc:147:30
    #7 0x7f55f50cbced in rtc::TaskQueue::Impl::OnWakeup(int, short, void*) src/media/webrtc/trunk/webrtc/rtc_base/task_queue_libevent.cc:438:18
    #8 0x7f55ec285192 in event_persist_closure src/ipc/chromium/src/third_party/libevent/event.c:1580:9
    #9 0x7f55ec285192 in event_process_active_single_queue src/ipc/chromium/src/third_party/libevent/event.c:1639:4
    #10 0x7f55ec27c688 in event_process_active src/ipc/chromium/src/third_party/libevent/event.c
    #11 0x7f55ec27c688 in event_base_loop src/ipc/chromium/src/third_party/libevent/event.c:1961:12
    #12 0x7f55f50cb4fc in rtc::TaskQueue::Impl::ThreadMain(void*) src/media/webrtc/trunk/webrtc/rtc_base/task_queue_libevent.cc:407:5
    #13 0x7f55f50b79cd in rtc::PlatformThread::Run() src/media/webrtc/trunk/webrtc/rtc_base/platform_thread.cc:246:5
    #14 0x7f55f50b70bc in rtc::PlatformThread::StartThread(void*) src/media/webrtc/trunk/webrtc/rtc_base/platform_thread.cc:162:40
    #15 0x7f560c6716da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
    #16 0x7f560b64f88e in clone /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Summary: null pointer passed as argument 2, which is declared to never be null in /usr/include/string.h:47 → null pointer passed as argument 2, which is declared to never be null in media/webrtc/trunk/webrtc/modules/include/module_common_types.h

Same bug is still present upstream, although the method has been renamed.

Assignee: nobody → dminor
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P1
Attachment #9160442 - Attachment description: Bug 1649311 - Check for nullptr in VerifyAndAllocateFragmentationHeader; r=ng! → Bug 1649311 - Check oldVectorSize before copying in VerifyAndAllocateFragmentationHeader; r=ng!

This has landed upstream.

Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0bbf0602c3fe Check oldVectorSize before copying in VerifyAndAllocateFragmentationHeader; r=ng
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Regressions: 1653550
No longer regressions: 1653550
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: