-
Fix translator handling of basic block indices. · ac7d7344Karl Schimpf authored
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 Review URL: https://codereview.chromium.org/1275953002 .
ac7d7344
×