The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Apple’s stable releases of Clang as well as support the Swift project.
Count and Skip should use uint64_t as they are encoded/decoded using 64-bit ULEB128.
In *_OPCODE_DO_*_ULEB_TIMES_SKIPPING_ULEB, Skip could be encoded as a two's complement for moving SegmentOffset backwards. Having a 32-bit Skip truncates the encoded value and leads to a malformed AdvanceAmount
and invalid SegmentOffset that extends past valid sections.
(cherry picked from commit b910bebc300dafb30569cecc3017b446ea8eafa0)
Count
andSkip
should useuint64_t
as they are encoded/decoded using 64-bit ULEB128.In
*_OPCODE_DO_*_ULEB_TIMES_SKIPPING_ULEB
,Skip
could be encoded as a two's complement for movingSegmentOffset
backwards. Having a 32-bitSkip
truncates the encoded value and leads to a malformedAdvanceAmount
and invalidSegmentOffset
that extends past valid sections.(cherry picked from commit b910bebc300dafb30569cecc3017b446ea8eafa0)