Closed Bug 1581964 Opened 5 years ago Closed 5 years ago

left shift of 1 by 31 places cannot be represented in type 'int' in media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c:1483:33

Categories

(Core :: WebRTC: Signaling, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: tsmith, Assigned: bwc)

References

(Blocks 1 open bug)

Details

(Keywords: csectype-undefined)

Attachments

(1 file)

This is triggered when running gtests with an UBSan build.

To enable this check add the following to your mozconfig:

ac_add_options --enable-address-sanitizer
ac_add_options --enable-undefined-sanitizer="shift"
ac_add_options --disable-jemalloc

Traceback:

media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c:1483:33: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
    #0 0x7f5885281fda in sdp_parse_attr_fmtp media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c:1483:33
    #1 0x7f5885278749 in sdp_parse_attribute media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c:185:14
    #2 0x7f58852ae590 in sdp_parse media/webrtc/signaling/src/sdp/sipcc/sdp_main.c:1138:18
    #3 0x7f58853017eb in mozilla::SipccSdpParser::Parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) media/webrtc/signaling/src/sdp/SipccSdpParser.cpp:63:25
    #4 0x7f58827b4254 in test::NewSdpTest::ParseSdp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) media/webrtc/signaling/gtest/sdp_unittests.cpp:1570:27
    #5 0x7f58827104fd in test::NewSdpTest_CheckTelephoneEventBadThreeDigitWithHyphen_Test::TestBody() media/webrtc/signaling/gtest/sdp_unittests.cpp:2356:3
    #6 0x7f588287e55b in testing::Test::Run() testing/gtest/gtest/src/gtest.cc:2519:5
    #7 0x7f588287f405 in testing::TestInfo::Run() testing/gtest/gtest/src/gtest.cc:2695:11
    #8 0x7f588287fbf1 in testing::TestCase::Run() testing/gtest/gtest/src/gtest.cc:2813:28
    #9 0x7f588288d642 in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/gtest/src/gtest.cc:5179:43
    #10 0x7f588288d106 in testing::UnitTest::Run() testing/gtest/gtest/src/gtest.cc:4788:10
    #11 0x7f58828c64f7 in mozilla::RunGTestFunc(int*, char**) testing/gtest/mozilla/GTestRunner.cpp:158:10
    #12 0x7f588d0a1da0 in XREMain::XRE_mainStartup(bool*) toolkit/xre/nsAppRunner.cpp:3788:16
    #13 0x7f588d0aa9b9 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) toolkit/xre/nsAppRunner.cpp:4722:12
    #14 0x7f588d0ab421 in XRE_main(int, char**, mozilla::BootstrapConfig const&) toolkit/xre/nsAppRunner.cpp:4816:21
    #15 0x5608df0adcae in do_main(int, char**, char**) browser/app/nsBrowserApp.cpp:218:22
    #16 0x5608df0ad344 in main browser/app/nsBrowserApp.cpp:300:16

Byron, would you help me triage this?

Flags: needinfo?(docfaraday)
Assignee: nobody → docfaraday
Flags: needinfo?(docfaraday)
Priority: -- → P2
Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e62faff6336c Cast this constant (which is just 1) to an unsigned before left-shifting it. r=mjf
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: