diff options
| author | Dario Domizioli <dario.domizioli@gmail.com> | 2014-10-15 16:18:20 +0000 |
|---|---|---|
| committer | Dario Domizioli <dario.domizioli@gmail.com> | 2014-10-15 16:18:20 +0000 |
| commit | a60f532a9132c39e4fbd4000f6c2dc20221c44a8 (patch) | |
| tree | 829f54799181c4b98c63f5ab97ba001a98175da9 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | d79c4fd595a24493ea0d9ec84019ef52c4cad41b (diff) | |
| download | llvm-a60f532a9132c39e4fbd4000f6c2dc20221c44a8.zip llvm-a60f532a9132c39e4fbd4000f6c2dc20221c44a8.tar.gz llvm-a60f532a9132c39e4fbd4000f6c2dc20221c44a8.tar.bz2 | |
Fix for PR21254 - Assertion in comment parser
The size of the ID field in CommandInfo was narrow, leading to potential
wrap-around of command IDs, causing misinterpretation later on.
The patch does the following:
- It extends the ID bitfield from 8 to 20 bits.
- It provides a DRY definition of the number of bits for the field to
avoid using literal numbers in different files.
- It introduces a new assertion that checks for the wrap-around.
- It adds the testcase from PR21254.
llvm-svn: 219802
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions
