DescriptionFix handling of TYPE_CODE_NUMENTRY record when size large.
Fixes how (very) large size entries in the TYPE_CODE_NUMENTRY is
handled when reading bitcode. Makes sure that we con't call
vector.resize() with too large a value (replacing an allocation
exception with a parse error).
Also tries to clean up type modeling of bitcode indices (references to
values etc in the bitcode). Uses common type NaClBcIndexSize_t and
NaClRelBcIndexSize_t (defined in nacl) to describe these (32-bit)
values.
Note: We use cast truncation of 64-bit values to NaClBcIndexSize_t and
NaClRelBcIndexSize_t, since negative value indices are stored both as
32 and 64 bit values. The truncation cast handles this differences
correctly (and efficiently).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4195
R=stichnot@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=74cd883a0b3ccb0920e5990ed860b1862ac73090
Patch Set 1 #Patch Set 2 : Fix formatting. #
Total comments: 10
Patch Set 3 : Fix issues in patch set 2. #
Total comments: 4
Patch Set 4 : Fix nits. #
Messages
Total messages: 7 (1 generated)
|