[PATCH] D82886: [DebugInfo] Fix a possible crash when reading a malformed .debug_*lists section.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 20:35:33 PDT 2020


ikudrin added a comment.

In D82886#2126027 <https://reviews.llvm.org/D82886#2126027>, @dblaikie wrote:

> Is this assertion really valuable? "length()" does the same addition that is done to create the value that length() is being compared to - it's pretty trivial? Perhaps "FullLength" should be initialized with a call to length instead of duplicating that addition?


In that case, we have a small inconsistency in the error message. In most cases, we report the full length of the data, which is the value of the unit length field plus the size of the field itself, but for the unit length of 0, we would not add the size of the field and would report only the raw value. This inconsistency is the only reason we calculate `FullLength` directly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82886/new/

https://reviews.llvm.org/D82886





More information about the llvm-commits mailing list