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
Review URL: https://codereview.chromium.org/
1678913002
'../third_party/externals/piex/src/tiff_directory/tiff_directory.cc',
'../third_party/externals/piex/src/tiff_parser.cc',
],
+ 'defines': [ 'BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE' ],
'include_dirs': [ '../third_party/externals/piex' ],
'direct_dependent_settings': {
'include_dirs': [ '../third_party/externals/piex' ],