Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4873)

Issue 9193045: Clamped negative index access. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by Alok Priyadarshi
Modified:
10 years, 11 months ago
Reviewers:
kbr1, aedla
CC:
angleproject-review_googlegroups.com
Base URL:
https://angleproject.googlecode.com/svn/trunk
Visibility:
Public.

Description

Clamped negative index access. Fixed error that allowed negative index for accessing vector, matrix, and array. Now we report compile error and clamp the index to 0. Re-arranged code around it to handle negative index at the one location. BUG=crbug.com/239411 TEST=bug test case R=aedla@chromium.org, kbr@chromium.org Committed: https://code.google.com/p/angleproject/source/detail?r=2207

Patch Set 1 #

Total comments: 6

Patch Set 2 : clamped index to upper range #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -118 lines) Patch
M src/compiler/glslang.y View 1 2 chunks +57 lines, -49 lines 0 comments Download
M src/compiler/glslang_tab.cpp View 1 3 chunks +77 lines, -69 lines 0 comments Download

Messages

Total messages: 6
Alok Priyadarshi
10 years, 11 months ago (2013-05-13 20:19:28 UTC) #1
kbr1
LGTM https://codereview.appspot.com/9193045/diff/1/src/compiler/glslang.y File src/compiler/glslang.y (right): https://codereview.appspot.com/9193045/diff/1/src/compiler/glslang.y#newcode293 src/compiler/glslang.y:293: if ($1->getType().getArraySize() == 0) { What case does ...
10 years, 11 months ago (2013-05-13 21:24:49 UTC) #2
Alok Priyadarshi
https://codereview.appspot.com/9193045/diff/1/src/compiler/glslang.y File src/compiler/glslang.y (right): https://codereview.appspot.com/9193045/diff/1/src/compiler/glslang.y#newcode293 src/compiler/glslang.y:293: if ($1->getType().getArraySize() == 0) { I noticed it too ...
10 years, 11 months ago (2013-05-13 21:41:17 UTC) #3
aedla
LGTM, looks somewhat cleaner now. Not sure why src/compiler/glslang_tab.cpp says "Bad content. Try to upload ...
10 years, 11 months ago (2013-05-14 08:16:47 UTC) #4
Alok Priyadarshi
https://codereview.appspot.com/9193045/diff/1/src/compiler/glslang.y File src/compiler/glslang.y (right): https://codereview.appspot.com/9193045/diff/1/src/compiler/glslang.y#newcode281 src/compiler/glslang.y:281: if ($1->isArray()) { // constant folding for arrays You ...
10 years, 11 months ago (2013-05-14 17:16:21 UTC) #5
Alok Priyadarshi
10 years, 11 months ago (2013-05-14 17:18:03 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r2207 (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b