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

Issue 2310243002: Supress integer-overflow in TexSubImage2D(3D)Impl (Closed)

Created:
4 years, 3 months ago by xidachen
Modified:
4 years, 3 months ago
CC:
chromium-reviews, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Supress integer-overflow in TexSubImage2D(3D)Impl Currently in these two functions, we are not using CheckedNumeric. This CL uses CheckedNumeric to ensure that integer-overflow will not happen BUG=644271 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/e8c2ace2094db0c61c9a2deea1f51b5b1054a305 Cr-Commit-Position: refs/heads/master@{#417137}

Patch Set 1 #

Patch Set 2 : one more place #

Total comments: 2

Patch Set 3 : remove un-necessary checks #

Patch Set 4 : clean up #

Total comments: 4

Patch Set 5 : address comments #

Total comments: 4

Patch Set 6 : address comments #

Total comments: 2

Patch Set 7 : more on comments #

Patch Set 8 : move check to call sites #

Total comments: 2

Patch Set 9 : check xoffset #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -0 lines) Patch
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 3 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (15 generated)
xidachen
PTAL
4 years, 3 months ago (2016-09-06 20:15:05 UTC) #3
Zhenyao Mo
https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc#newcode3051 gpu/command_buffer/client/gles2_implementation.cc:3051: base::CheckedNumeric<unsigned int> desired_size = buffer_padded_row_size; I dig a little ...
4 years, 3 months ago (2016-09-06 21:52:10 UTC) #4
xidachen
On 2016/09/06 21:52:10, Zhenyao Mo wrote: > https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc > File gpu/command_buffer/client/gles2_implementation.cc (right): > > https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc#newcode3051 ...
4 years, 3 months ago (2016-09-07 00:47:25 UTC) #7
Zhenyao Mo
On 2016/09/07 00:47:25, xidachen wrote: > On 2016/09/06 21:52:10, Zhenyao Mo wrote: > > > ...
4 years, 3 months ago (2016-09-07 00:50:20 UTC) #8
xidachen
On 2016/09/06 21:52:10, Zhenyao Mo wrote: > https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc > File gpu/command_buffer/client/gles2_implementation.cc (right): > > https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc#newcode3051 ...
4 years, 3 months ago (2016-09-07 00:50:27 UTC) #9
xidachen
On 2016/09/07 00:50:20, Zhenyao Mo wrote: > On 2016/09/07 00:47:25, xidachen wrote: > > On ...
4 years, 3 months ago (2016-09-07 00:53:57 UTC) #10
xidachen
https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/20001/gpu/command_buffer/client/gles2_implementation.cc#newcode3051 gpu/command_buffer/client/gles2_implementation.cc:3051: base::CheckedNumeric<unsigned int> desired_size = buffer_padded_row_size; On 2016/09/06 21:52:10, Zhenyao ...
4 years, 3 months ago (2016-09-07 02:09:42 UTC) #11
Zhenyao Mo
Good catch. https://codereview.chromium.org/2310243002/diff/60001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/60001/gpu/command_buffer/client/gles2_implementation.cc#newcode3072 gpu/command_buffer/client/gles2_implementation.cc:3072: yoffset = updated_yoffset.ValueOrDefault(std::numeric_limits<int>::max()); Can we generate an ...
4 years, 3 months ago (2016-09-07 02:15:16 UTC) #12
xidachen
https://codereview.chromium.org/2310243002/diff/60001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/60001/gpu/command_buffer/client/gles2_implementation.cc#newcode3072 gpu/command_buffer/client/gles2_implementation.cc:3072: yoffset = updated_yoffset.ValueOrDefault(std::numeric_limits<int>::max()); On 2016/09/07 02:15:16, Zhenyao Mo wrote: ...
4 years, 3 months ago (2016-09-07 12:23:00 UTC) #13
Zhenyao Mo
https://codereview.chromium.org/2310243002/diff/80001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/80001/gpu/command_buffer/client/gles2_implementation.cc#newcode3072 gpu/command_buffer/client/gles2_implementation.cc:3072: yoffset = updated_yoffset.ValueOrDefault(GL_INVALID_VALUE); You misunderstood me. It should be ...
4 years, 3 months ago (2016-09-07 17:05:34 UTC) #14
xidachen
https://codereview.chromium.org/2310243002/diff/80001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/80001/gpu/command_buffer/client/gles2_implementation.cc#newcode3072 gpu/command_buffer/client/gles2_implementation.cc:3072: yoffset = updated_yoffset.ValueOrDefault(GL_INVALID_VALUE); On 2016/09/07 17:05:33, Zhenyao Mo wrote: ...
4 years, 3 months ago (2016-09-07 17:36:39 UTC) #15
Zhenyao Mo
lgtm with nits fixed. https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc#newcode3171 gpu/command_buffer/client/gles2_implementation.cc:3171: "yoffset + row_index overflows"); row_index ...
4 years, 3 months ago (2016-09-07 17:39:23 UTC) #16
piman
https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc#newcode3074 gpu/command_buffer/client/gles2_implementation.cc:3074: "yoffset + height overflows"); Here and other places: we ...
4 years, 3 months ago (2016-09-07 17:48:18 UTC) #19
Zhenyao Mo
On 2016/09/07 17:48:18, piman wrote: > https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc > File gpu/command_buffer/client/gles2_implementation.cc (right): > > https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc#newcode3074 > ...
4 years, 3 months ago (2016-09-07 17:55:26 UTC) #20
xidachen
On 2016/09/07 17:55:26, Zhenyao Mo wrote: > On 2016/09/07 17:48:18, piman wrote: > > > ...
4 years, 3 months ago (2016-09-07 18:07:20 UTC) #21
xidachen
On 2016/09/07 17:48:18, piman wrote: > https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc > File gpu/command_buffer/client/gles2_implementation.cc (right): > > https://codereview.chromium.org/2310243002/diff/100001/gpu/command_buffer/client/gles2_implementation.cc#newcode3074 > ...
4 years, 3 months ago (2016-09-07 20:51:08 UTC) #24
Zhenyao Mo
https://codereview.chromium.org/2310243002/diff/140001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/140001/gpu/command_buffer/client/gles2_implementation.cc#newcode2879 gpu/command_buffer/client/gles2_implementation.cc:2879: base::CheckedNumeric<GLint> checked_yoffset = yoffset; Let's do xoffset + width ...
4 years, 3 months ago (2016-09-07 21:03:18 UTC) #25
xidachen
https://codereview.chromium.org/2310243002/diff/140001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/2310243002/diff/140001/gpu/command_buffer/client/gles2_implementation.cc#newcode2879 gpu/command_buffer/client/gles2_implementation.cc:2879: base::CheckedNumeric<GLint> checked_yoffset = yoffset; On 2016/09/07 21:03:18, Zhenyao Mo ...
4 years, 3 months ago (2016-09-07 23:05:19 UTC) #26
piman
lgtm
4 years, 3 months ago (2016-09-07 23:09:59 UTC) #27
Zhenyao Mo
lgtm
4 years, 3 months ago (2016-09-07 23:20:27 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2310243002/160001
4 years, 3 months ago (2016-09-08 00:42:46 UTC) #34
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 3 months ago (2016-09-08 01:08:08 UTC) #36
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 01:11:15 UTC) #38
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/e8c2ace2094db0c61c9a2deea1f51b5b1054a305
Cr-Commit-Position: refs/heads/master@{#417137}

Powered by Google App Engine
This is Rietveld 408576698