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

Issue 1363983002: Check that address is i32 for indirect calls. (Closed)

Created:
5 years, 3 months ago by Karl
Modified:
5 years, 2 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

Check that address is i32 for indirect calls. Fixes bug where code did not check that the address of an indirect call must be i32. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4321 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=fc0a52df6a03ee82208c65ae5d33745baf7caa64

Patch Set 1 #

Patch Set 2 : Fix nit. #

Total comments: 4

Patch Set 3 : Rework of code to handle call instruction. #

Patch Set 4 : Clean up code some more. #

Total comments: 4

Patch Set 5 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -132 lines) Patch
M src/PNaClTranslator.cpp View 1 2 3 4 4 chunks +104 lines, -118 lines 0 comments Download
M tests_lit/llvm2ice_tests/Input/no-terminator-inst.tbc View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + tests_lit/parse_errs/Inputs/indirect-call-on-float.tbc View 1 chunk +8 lines, -8 lines 0 comments Download
M tests_lit/parse_errs/bad-intrinsic-arg.test View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/parse_errs/call-fcn-bad-param-type.ll View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/parse_errs/call-fcn-bad-return-type.ll View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/parse_errs/call-indirect-i8.ll View 1 2 1 chunk +1 line, -1 line 0 comments Download
A tests_lit/parse_errs/indirect-call-on-float.test View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M tests_lit/parse_errs/symtab-after-fcn.test View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 7 (1 generated)
Karl
5 years, 3 months ago (2015-09-23 16:45:16 UTC) #2
Jim Stichnoth
https://codereview.chromium.org/1363983002/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1363983002/diff/20001/src/PNaClTranslator.cpp#newcode2665 src/PNaClTranslator.cpp:2665: Ice::Operand *Callee = getOperand(CalleeIndex); Would it make sense to ...
5 years, 3 months ago (2015-09-23 20:40:07 UTC) #3
Karl
https://codereview.chromium.org/1363983002/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1363983002/diff/20001/src/PNaClTranslator.cpp#newcode2665 src/PNaClTranslator.cpp:2665: Ice::Operand *Callee = getOperand(CalleeIndex); On 2015/09/23 20:40:06, stichnot wrote: ...
5 years, 3 months ago (2015-09-24 21:28:22 UTC) #4
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/1363983002/diff/60001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1363983002/diff/60001/src/PNaClTranslator.cpp#newcode2067 src/PNaClTranslator.cpp:2067: const Ice::IceString UnknownName("function"); Can you just do: ...
5 years, 2 months ago (2015-09-25 22:13:20 UTC) #5
Karl
Committed patchset #5 (id:80001) manually as fc0a52df6a03ee82208c65ae5d33745baf7caa64 (presubmit successful).
5 years, 2 months ago (2015-09-28 18:23:01 UTC) #6
Karl
5 years, 2 months ago (2015-09-28 18:23:12 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1363983002/diff/60001/src/PNaClTranslator.cpp
File src/PNaClTranslator.cpp (right):

https://codereview.chromium.org/1363983002/diff/60001/src/PNaClTranslator.cpp...
src/PNaClTranslator.cpp:2067: const Ice::IceString UnknownName("function");
On 2015/09/25 22:13:20, stichnot wrote:
> Can you just do:
>   return "function";
> ?

Done.

https://codereview.chromium.org/1363983002/diff/60001/src/PNaClTranslator.cpp...
src/PNaClTranslator.cpp:2818: for (auto Param : Params)
On 2015/09/25 22:13:20, stichnot wrote:
> auto *Param
> 
> But actually, I'd prefer "Ice::Operand *Param : Params" because it's still not
> that verbose and the definition of Params is non-obvious and relatively far
> away.

Done.

Powered by Google App Engine
This is Rietveld 408576698