[llvm-dev] "Invalid encoding" occurs when reading STRTAB_BLOCK of bitcode generated by LTO
Stephan Z via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 14 22:43:56 PDT 2020
Can STRTAB_BLOCK include more than one STRTAB_BLOB records?
"""The STRTAB block (id 23) contains a *single* record (STRTAB_BLOB, id 1)
with a single blob operand containing the bitcode file’s string table. ...
The code readBlobInRecord
assumes this because if there are multiple blob records, only the last one
I found an "Invalid encoding" from hasEncodingData
<https://llvm.org/doxygen/BitCodes_8h_source.html#l00126> when reading the
bitcode generated by LTO. This happens when reading a STRTAB_BLOCK.
The STRTAB_BLOCK contains the following:
* abbrev definition, 1, blob // abbrev_id = 4*
* STRTAB_BLOB, 549524261, data*
* STRTAB_BLOB, 29258, data*
* abbrev definition, 14, ..... // crashes when reading the 9th operand
where the encoding data are not between 1 to 5
Does this mean the bitcode generated by LTO was corrupt? Does anyone happen
to have a similar issue before?
Thank you, S
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev