DescriptionFix translator handling of basic block indices.
The code used to use a vector to hold basic blocks associated with
indices. This had two problem: 1) The "number of blocks" record would
generate a vector of the given size (even if very large); and 2)
Indices would expand the vector to define the index (even if very
large).
In most cases, such large values are incorrect. To fix this, this
patch uses a map from block index, to the corresponding basic block.
Only after all basic block indices have been processed, we check that
the size makes sense, and convert it to a vector.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4261
R=jpp@chromium.org, stichnot@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=ac7d73441e1c599108b20c4702a96db0e956889e
Patch Set 1 #
Total comments: 22
Patch Set 2 : Fix issues in patch set 1. #
Total comments: 4
Patch Set 3 : Fix nits. #
Messages
Total messages: 9 (1 generated)
|