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

Issue 13195043: Clamp numeric overflow rather than failing with an error (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by Zhenyao Mo
Modified:
10 years, 8 months ago
CC:
angleproject-review_googlegroups.com
Base URL:
https://code.google.com/p/angleproject/@master
Visibility:
Public.

Description

Clamp numeric overflow rather than failing with an error BUG=249086 ANGLEBUG=468 TEST= R=alokp@chromium.org, kbr@chromium.org Committed: https://code.google.com/p/angleproject/source/detail?r=521c836

Patch Set 1 #

Patch Set 2 : tab removal #

Patch Set 3 : fix #

Total comments: 3

Patch Set 4 : revised per alokp review #

Total comments: 5

Patch Set 5 : fix the sign bug #

Total comments: 4

Patch Set 6 : update #

Patch Set 7 : update #

Total comments: 4

Patch Set 8 : update #

Total comments: 8

Patch Set 9 : revised #

Patch Set 10 : update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -56 lines) Patch
M src/common/version.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/glslang.l View 1 2 3 4 5 6 7 3 chunks +24 lines, -6 lines 0 comments Download
M src/compiler/glslang_lex.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +24 lines, -6 lines 0 comments Download
M src/compiler/preprocessor/Preprocessor.cpp View 1 2 3 4 5 1 chunk +0 lines, -28 lines 0 comments Download
M src/compiler/util.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -9 lines 0 comments Download
M src/compiler/util.cpp View 1 2 3 4 5 6 7 8 2 chunks +29 lines, -6 lines 0 comments Download

Messages

Total messages: 16
Zhenyao Mo
Alok: please review. kbr: FYI. Shannon: please merge after it lands.
10 years, 8 months ago (2013-08-23 18:53:22 UTC) #1
Zhenyao Mo
I realized the "-" is already stripped out as another token at this point, so ...
10 years, 8 months ago (2013-08-23 19:02:27 UTC) #2
kbr1
LGTM Do the new constants cause any problems with OpenGL ES devices that only support ...
10 years, 8 months ago (2013-08-23 21:35:24 UTC) #3
Zhenyao Mo
It doesn' matter (for all the three questions in kbr's review). We just want to ...
10 years, 8 months ago (2013-08-24 00:04:32 UTC) #4
Alok Priyadarshi
https://codereview.appspot.com/13195043/diff/5001/src/compiler/preprocessor/Preprocessor.cpp File src/compiler/preprocessor/Preprocessor.cpp (right): https://codereview.appspot.com/13195043/diff/5001/src/compiler/preprocessor/Preprocessor.cpp#newcode111 src/compiler/preprocessor/Preprocessor.cpp:111: std::ostringstream ss; I think it is fine to clamp, ...
10 years, 8 months ago (2013-08-26 04:29:39 UTC) #5
Zhenyao Mo
revised per alokp's review. please have another look. https://codereview.appspot.com/13195043/diff/12001/src/compiler/preprocessor/DiagnosticsBase.h File src/compiler/preprocessor/DiagnosticsBase.h (right): https://codereview.appspot.com/13195043/diff/12001/src/compiler/preprocessor/DiagnosticsBase.h#newcode60 src/compiler/preprocessor/DiagnosticsBase.h:60: UNEXPECTED_TOKEN, ...
10 years, 8 months ago (2013-08-27 23:22:41 UTC) #6
kbr1
I defer to Alok's review -- I thought in an earlier review that the '-' ...
10 years, 8 months ago (2013-08-28 01:54:16 UTC) #7
Zhenyao Mo
Yes, "-" is a separate token, but inside Token where we process int token, we ...
10 years, 8 months ago (2013-08-28 16:52:12 UTC) #8
Alok Priyadarshi
You might also need to fix preprocessor tests. https://codereview.appspot.com/13195043/diff/23001/src/compiler/preprocessor/DiagnosticsBase.h File src/compiler/preprocessor/DiagnosticsBase.h (right): https://codereview.appspot.com/13195043/diff/23001/src/compiler/preprocessor/DiagnosticsBase.h#newcode30 src/compiler/preprocessor/DiagnosticsBase.h:30: CONDITIONAL_ENDIF_WITHOUT_IF, ...
10 years, 8 months ago (2013-08-28 17:25:35 UTC) #9
Zhenyao Mo
alok, please take another look. I'll clean up the glslang_tab stuff once this CL is ...
10 years, 8 months ago (2013-08-28 23:44:49 UTC) #10
Alok Priyadarshi
https://codereview.appspot.com/13195043/diff/36001/src/compiler/glslang.l File src/compiler/glslang.l (right): https://codereview.appspot.com/13195043/diff/36001/src/compiler/glslang.l#newcode194 src/compiler/glslang.l:194: 0[xX]{H}+ { if (!atoi_clamp(yytext, &(yylval->lex.i))) warn_int_overflow(yyscanner); return INTCONSTANT; } ...
10 years, 8 months ago (2013-08-28 23:55:50 UTC) #11
Zhenyao Mo
https://codereview.appspot.com/13195043/diff/36001/src/compiler/glslang.l File src/compiler/glslang.l (right): https://codereview.appspot.com/13195043/diff/36001/src/compiler/glslang.l#newcode194 src/compiler/glslang.l:194: 0[xX]{H}+ { if (!atoi_clamp(yytext, &(yylval->lex.i))) warn_int_overflow(yyscanner); return INTCONSTANT; } ...
10 years, 8 months ago (2013-08-29 00:18:03 UTC) #12
Alok Priyadarshi
lgtm after you address these comments. Please revert the changes in glslang_tab.[h,cpp]. And generate glslang_lex.cpp ...
10 years, 8 months ago (2013-08-29 05:27:39 UTC) #13
Zhenyao Mo
https://codereview.appspot.com/13195043/diff/37009/src/compiler/util.cpp File src/compiler/util.cpp (right): https://codereview.appspot.com/13195043/diff/37009/src/compiler/util.cpp#newcode22 src/compiler/util.cpp:22: { On 2013/08/29 05:27:39, Alok Priyadarshi wrote: > this ...
10 years, 8 months ago (2013-08-29 21:55:18 UTC) #14
Alok Priyadarshi
lgtm
10 years, 8 months ago (2013-08-29 22:05:29 UTC) #15
Zhenyao Mo
10 years, 8 months ago (2013-08-29 22:17:09 UTC) #16
Message was sent while issue was closed.
Committed patchset #10 manually as r521c836 (presubmit successful).
Sign in to reply to this message.

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