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

Issue 1579203002: Fix bitcode parser to check type signatures of functions. (Closed)

Created:
4 years, 11 months ago by Karl
Modified:
4 years, 11 months ago
Reviewers:
Jim Stichnoth, sehr, 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 bitcode parser to check type signatures of functions. Before, type signatures of functions were only checked when called. This CL fixes this by checking all function signatures. BUG=None R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=bba776874b3c0cc37e43bfa58d45630f2887bc0b

Patch Set 1 #

Patch Set 2 : Fix formatting. #

Patch Set 3 : Merge in master. #

Patch Set 4 : Fix detecting invalid intrinsic functions. #

Patch Set 5 : Fix nits. #

Total comments: 10

Patch Set 6 : Commit patch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -99 lines) Patch
M src/IceConverter.cpp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceGlobalInits.h View 1 2 3 4 5 3 chunks +35 lines, -5 lines 0 comments Download
M src/IceGlobalInits.cpp View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 2 3 4 5 5 chunks +14 lines, -14 lines 0 comments Download
M tests_lit/llvm2ice_tests/div_legalization.ll View 2 chunks +4 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/rmw.ll View 2 chunks +4 lines, -2 lines 0 comments Download
A + tests_lit/parse_errs/Inputs/call-fcn-bad-param-type.tbc View 1 chunk +10 lines, -11 lines 0 comments Download
M tests_lit/parse_errs/bad-intrinsic-arg.test View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/parse_errs/call-fcn-bad-param-type.ll View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
A tests_lit/parse_errs/call-fcn-bad-param-type.test View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
M tests_lit/parse_errs/call-fcn-bad-return-type.ll View 1 chunk +7 lines, -4 lines 0 comments Download
A + tests_lit/parse_errs/fcn-bad-param-type.ll View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/parse_errs/nacl-fake-intrinsic.ll View 1 2 3 1 chunk +5 lines, -28 lines 0 comments Download
M tests_lit/reader_tests/compare.ll View 16 chunks +28 lines, -28 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
Karl
4 years, 11 months ago (2016-01-14 21:33:03 UTC) #3
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h File src/IceGlobalInits.h (right): https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h#newcode160 src/IceGlobalInits.h:160: /// Validates that type signature of function ...
4 years, 11 months ago (2016-01-14 22:59:08 UTC) #4
Karl
Committed patchset #6 (id:100001) manually as bba776874b3c0cc37e43bfa58d45630f2887bc0b (presubmit successful).
4 years, 11 months ago (2016-01-15 15:33:20 UTC) #6
Karl
4 years, 11 months ago (2016-01-15 15:33:34 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h
File src/IceGlobalInits.h (right):

https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h#ne...
src/IceGlobalInits.h:160: /// Validates that type signature of function is
correct. Returns true if
On 2016/01/14 22:59:08, stichnot wrote:
> How about "the type signature" and "the function"?

Done.

https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h#ne...
src/IceGlobalInits.h:161: /// valid,
On 2016/01/14 22:59:08, stichnot wrote:
> End sentence with a period, or fill in the missing remainder. :)

Done.

https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h#ne...
src/IceGlobalInits.h:170: /// Generates error message describing why
validateTypeSignature returns
On 2016/01/14 22:59:08, stichnot wrote:
> an error message

Done.

https://codereview.chromium.org/1579203002/diff/80001/src/IceGlobalInits.h#ne...
src/IceGlobalInits.h:184: getIntrinsicInfo(const GlobalContext *Ctx, bool
&IsIntrinsic) const;
On 2016/01/14 22:59:08, stichnot wrote:
> I'm guessing John is going to ask for bool* here.

Changed to use bool *.

https://codereview.chromium.org/1579203002/diff/80001/src/PNaClTranslator.cpp
File src/PNaClTranslator.cpp (right):

https://codereview.chromium.org/1579203002/diff/80001/src/PNaClTranslator.cpp...
src/PNaClTranslator.cpp:644: for (const auto FuncDecl : FunctionDeclarations) {
On 2016/01/14 22:59:08, stichnot wrote:
> I would use Ice::FunctionDeclaration* instead of auto.

Done.

Powered by Google App Engine
This is Rietveld 408576698