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

Issue 1362643002: Fix pnacl-sz to not accept files containing multiple modules. (Closed)

Created:
5 years, 3 months ago by Karl
Modified:
5 years, 3 months ago
Reviewers:
Jim Stichnoth, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix pnacl-sz to not accept files containing multiple modules. Previous code checked, after the fact, that there weren't multiple modules in the block. However, the code for TopLevelParser assumes that there is only on module block, allowing it to more efficiently test internal state. To fix the problem, modified TopLevelParser::ParseBlock to fail, and not attempt to parse the second block if the file contains more than one block. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4260 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=0b8763eae21d5d8952d401cf8e4dd7e4fe9b401d

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -13 lines) Patch
M src/PNaClTranslator.cpp View 1 5 chunks +16 lines, -13 lines 0 comments Download
A tests_lit/parse_errs/Inputs/multiple-modules.tbc View 1 chunk +6 lines, -0 lines 0 comments Download
A tests_lit/parse_errs/multiple-modules.test View 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Karl
5 years, 3 months ago (2015-09-22 17:23:40 UTC) #2
Jim Stichnoth
lgtm https://codereview.chromium.org/1362643002/diff/1/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1362643002/diff/1/src/PNaClTranslator.cpp#newcode3231 src/PNaClTranslator.cpp:3231: bool results = Parser.ParseThisBlock(); capitalize Results. Better yet, ...
5 years, 3 months ago (2015-09-22 17:33:43 UTC) #3
Karl
Committed patchset #2 (id:20001) manually as 0b8763eae21d5d8952d401cf8e4dd7e4fe9b401d (presubmit successful).
5 years, 3 months ago (2015-09-22 17:41:16 UTC) #4
Karl
5 years, 3 months ago (2015-09-22 17:41:31 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/1362643002/diff/1/src/PNaClTranslator.cpp
File src/PNaClTranslator.cpp (right):

https://codereview.chromium.org/1362643002/diff/1/src/PNaClTranslator.cpp#new...
src/PNaClTranslator.cpp:3231: bool results = Parser.ParseThisBlock();
On 2015/09/22 17:33:43, stichnot wrote:
> capitalize Results.
> 
> Better yet, rename to something like ParseSuccess ?

Used ParseFailed, since that is the context of the boolen.

Powered by Google App Engine
This is Rietveld 408576698