This is an archive of the discontinued LLVM Phabricator instance.

Fix for llvm-dis/llvm-bcanalyzer overflows
ClosedPublic

Authored by tejohnson on Jun 4 2018, 10:56 AM.

Details

Summary

These tools failed for a very large bitcode file produced by LTO due to
64-bit values being assigned to 32-bit types. For the BitstreamReader.h
fix, the value initially fit into the 32-bit unsigned, but there was an
overflow when multiplying by 32 furter below to compute the bit offset.

No test case in the patch as this requires a huge bitcode file.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Jun 4 2018, 10:56 AM
george.karpenkov resigned from this revision.Jun 4 2018, 12:15 PM
pcc accepted this revision.Jun 4 2018, 12:18 PM

LGTM

This revision is now accepted and ready to land.Jun 4 2018, 12:18 PM
This revision was automatically updated to reflect the committed changes.