Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More fun with SAN [OLD #20] #11

Closed
MichaelChirico opened this issue Sep 30, 2019 · 0 comments
Closed

More fun with SAN [OLD #20] #11

MichaelChirico opened this issue Sep 30, 2019 · 0 comments

Comments

@MichaelChirico
Copy link
Owner

@MichaelChirico MichaelChirico commented Sep 30, 2019

Getting this:

geohash.cpp:462:37: runtime error: shift exponent 64 is too large for 32-bit type 'int'
    #0 0x7fd076af8b6b in geohash_decode_impl /data/gannet/ripley/R/packages/tests-gcc-SAN/geohashTools/src/geohash.cpp:462
    #1 0x7fd076af8b6b in geohash_decode(char*, unsigned long, double*, double*, double*, double*, int, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/geohashTools/src/geohash.cpp:473
    #2 0x7fd076b54d0f in gh_decode_(Rcpp::Vector<16, Rcpp::PreserveStorage>, bool, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/geohashTools/src/geohash.cpp:543
    #3 0x7fd076b025bf in _geohashTools_gh_decode_ /data/gannet/ripley/R/packages/tests-gcc-SAN/geohashTools/src/RcppExports.cpp:30

Seems to come from:

gh_decode(paste(rep("1", 26L), collapse = ""))

because length = 26 and ((5*length - (length %% 2)) %/%2 - 1) here:

*delta_latitude = 45.0/(double) (1 << ((5*length - (length % 2))/2 - 1));

But 1 is implicitly int which can't handle 64-bit input. Need to use a 64-bit integer instead.

Closed in 73ea7aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.