Skip to content
This repository was archived by the owner on Oct 30, 2021. It is now read-only.
This repository was archived by the owner on Oct 30, 2021. It is now read-only.

Integer overflow in delta encoding in __get #79

@springmeyer

Description

@springmeyer

More poking around carmen with an -fsanitize=undefined binary of carmen-cache has revealed a potential overflow. No idea yet if this is harmless, spurious, or an actual problem.

node ./scripts/carmen-analyze.js tiles/01-ne.country.mbtiles
Analyzing tiles/01-ne.country.mbtiles ...
../src/binding.cpp:122:43: runtime error: unsigned integer overflow: 5498430554125 - 6048152813581 cannot be represented in type 'unsigned long long'
SUMMARY: AddressSanitizer: undefined-behavior ../src/binding.cpp:122:43 in 
{ total: 5126,
  degen: 3407,
  ender: 1719,
  byScore: 
   { '0': 534,
     '1': 279,
     '2': 298,
     '3': 325,
     '4': 431,
     '5': 627,
     '6': 756,
     '7': NaN },
  byRelev: 
   { '0.4': 271,
     '0.6': 0,
     '0.8': 0,
     '1.0': 0,
     '1638.6': NaN,
     '1638.4': NaN,
     '1638.2': NaN,
     '1638.0': NaN,
     '1637.8': NaN,
     '1637.6': NaN,
     '1637.4': NaN,
     '1637.2': NaN,
     '1637.0': NaN } }

at

lastval = lastval - *it;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions