Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Issue 2157843002: Fix crash which happens when there's reordering in the beginning of a call. (Closed)

Created:
4 years, 5 months ago by stefan-webrtc
Modified:
4 years, 5 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, zhuangzesen_agora.io, sprang
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix crash which happens when there's reordering in the beginning of a call. The added unittest triggers this CHECK: https://chromium.googlesource.com/external/webrtc/+/433ed0680083d4f5315f5ec5e8122ef34901519a/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc#146 It happens because the unwrap of the sequence number fails if the unwrappers last sequence number is small, but the newly added sequence number is large (greater than last seq num + 2^15), and therefore should have been interpreted as a reordering and a backwards wrap. Since that would mean the sequence number returned from the unwrapper would be negative, it simply returns the original sequence number instead. This causes problems later where the wrap is correctly handled, and everything breaks. The real solution should be to correctly handle wraps, but to prevent the crash this is a reasonable workaround for now. BUG= Committed: https://crrev.com/159a2fe9da7194492d688f6b46f6e665821ddb8a Cr-Commit-Position: refs/heads/master@{#13496}

Patch Set 1 #

Patch Set 2 : nits #

Total comments: 5

Patch Set 3 : Addressed comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc View 2 chunks +23 lines, -1 line 0 comments Download

Messages

Total messages: 24 (13 generated)
stefan-webrtc
Terelius, can you take a look at this since Erik is on vacation?
4 years, 5 months ago (2016-07-17 11:33:35 UTC) #2
stefan-webrtc
nits
4 years, 5 months ago (2016-07-17 11:36:22 UTC) #3
pbos-webrtc
https://codereview.webrtc.org/2157843002/diff/20001/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc File webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc (right): https://codereview.webrtc.org/2157843002/diff/20001/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc#newcode97 webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc:97: if (seq > window_start_seq_ + 0xFFFF / 2) { ...
4 years, 5 months ago (2016-07-18 08:53:57 UTC) #12
stefan-webrtc
https://codereview.webrtc.org/2157843002/diff/20001/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc File webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc (right): https://codereview.webrtc.org/2157843002/diff/20001/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc#newcode97 webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc:97: if (seq > window_start_seq_ + 0xFFFF / 2) { ...
4 years, 5 months ago (2016-07-18 09:30:20 UTC) #13
pbos-webrtc
fwiw lgtm if you fix the ".F" typo. https://codereview.webrtc.org/2157843002/diff/20001/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc File webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc (right): https://codereview.webrtc.org/2157843002/diff/20001/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc#newcode97 webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc:97: if ...
4 years, 5 months ago (2016-07-18 09:32:39 UTC) #14
stefan-webrtc
Addressed comment.
4 years, 5 months ago (2016-07-18 09:50:20 UTC) #15
terelius
lgtm, though I would prefer to handle this in SequenceNumberUnwrapper.
4 years, 5 months ago (2016-07-18 10:22:11 UTC) #16
stefan-webrtc
On 2016/07/18 10:22:11, terelius wrote: > lgtm, though I would prefer to handle this in ...
4 years, 5 months ago (2016-07-18 10:28:28 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2157843002/40001
4 years, 5 months ago (2016-07-18 10:28:40 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-18 11:14:16 UTC) #22
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 11:14:28 UTC) #24
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/159a2fe9da7194492d688f6b46f6e665821ddb8a
Cr-Commit-Position: refs/heads/master@{#13496}

Powered by Google App Engine
This is Rietveld 408576698