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

Issue 1283353002: Fix handling errors in switch instruction by PNaCl bitcode reader. (Closed)

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

Description

Fix handling errors in switch instruction by PNaCl bitcode reader. The bitcode reader for the switch instruction has a couple of errors, which can cause asserts/crashes to occur. One problem was that it didn't check if the branch block of a case was defined. The other problem was that if an error occurred after the switch instruction was created, an assertion was fired for not deleting the switch instruction. BUG=None R=jfb@chromium.org Committed: https://chromium.googlesource.com/native_client/pnacl-llvm/+/510766d08eef6c49b259a24fa8b5f6d6e7fa6071

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use unique_ptr for switch instruction. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -2 lines) Patch
M lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp View 1 2 chunks +5 lines, -2 lines 2 comments Download
A test/NaCl/Bitcode/pnacl-bcdis/Inputs/bad-switch-case.tbc View 1 chunk +25 lines, -0 lines 0 comments Download
M test/NaCl/Bitcode/pnacl-bcdis/invalid.test View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Karl
5 years, 4 months ago (2015-08-12 20:46:50 UTC) #2
Karl
ping?
5 years, 4 months ago (2015-08-17 17:45:27 UTC) #3
JF
https://codereview.chromium.org/1283353002/diff/1/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp File lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp (right): https://codereview.chromium.org/1283353002/diff/1/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp#newcode1514 lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp:1514: delete SI; Can this file as well as upstream ...
5 years, 4 months ago (2015-08-18 17:07:46 UTC) #4
Karl
https://codereview.chromium.org/1283353002/diff/1/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp File lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp (right): https://codereview.chromium.org/1283353002/diff/1/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp#newcode1514 lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp:1514: delete SI; On 2015/08/18 17:07:46, JF wrote: > Can ...
5 years, 4 months ago (2015-08-19 19:39:00 UTC) #5
JF
lgtm https://codereview.chromium.org/1283353002/diff/20001/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp File lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp (right): https://codereview.chromium.org/1283353002/diff/20001/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp#newcode1878 lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp:1878: I = SI.release(); At this point it's probably ...
5 years, 4 months ago (2015-08-20 16:24:00 UTC) #6
Karl
https://codereview.chromium.org/1283353002/diff/20001/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp File lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp (right): https://codereview.chromium.org/1283353002/diff/20001/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp#newcode1878 lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp:1878: I = SI.release(); On 2015/08/20 16:24:00, JF wrote: > ...
5 years, 4 months ago (2015-08-20 18:30:51 UTC) #7
Karl
5 years, 4 months ago (2015-08-20 18:31:56 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
510766d08eef6c49b259a24fa8b5f6d6e7fa6071 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698