Descriptionmsan: define BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE in piex
This should assert(false) if we're in the error case of RangeCheckedBytePtr::extractBytes:
> #ifdef BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE
> #define BREAK_IF_DEBUGGING() assert(false)
> #else
> #define BREAK_IF_DEBUGGING() assert(true)
> #endif
...
> std::vector<unsigned char> RangeCheckedBytePtr::extractBytes(size_t pos, size_t length) const {
> std::vector<unsigned char> result;
> if (pos + length < pos /* overflow */ || remainingLength() < pos + length) {
> BREAK_IF_DEBUGGING();
> error_flag_ = RANGE_CHECKED_BYTE_ERROR_OVERFLOW;
> return result;
> }
...
BUG=skia:4903
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1678913002
Committed: https://skia.googlesource.com/skia/+/6fd4e44e238755f8f81d007c8281c8fd63f03b3b
Patch Set 1 #
Total comments: 2
Messages
Total messages: 16 (7 generated)
|