8000 Avoid clang-asan error from CPLString implicitly wrapped as an R character vector by ctoney · Pull Request #723 · USDAForestService/gdalraster · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Avoid clang-asan error from CPLString implicitly wrapped as an R character vector #723

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

ctoney
Copy link
Collaborator
@ctoney ctoney commented May 29, 2025

Avoids clang-asan / clang-ubsan errors due to the changes in #714 (i.e., at dev version 2.0.0.9000, not in released version). This PR uses Rcpp::String instead of CPLString in GDALRaster::infoAsJSON() and ogrinfo() (no longer attempts implicit wrapping of a CPLString object as R character vector).

gcc-asan did not report errors, but:

clang-ubsan

UndefinedBehaviorSanitizer:DEADLYSIGNAL
==6352==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000c99 (pc 0x7f8e3e7422e0 bp 0x7ffd70bd8a70 sp 0x7ffd70bd8238 T6352)
==6352==The signal is caused by a READ memory access.
==6352==Hint: address points to the zero page.
...

clang-asan

   *** caught segfault ***
  address 0xc99, cause 'memory not mapped'
  
  Traceback:
   1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: 0x503000024400>,     dll = list(name = "Rcpp", path = "/github/home/R/x86_64-pc-linux-gnu-library/4.6/Rcpp/libs/Rcpp.so",         dynamicLookup = TRUE, handle = <pointer: 0x51a0000b9480>,         info = <pointer: 0x508000000fa0>, forceSymbols = FALSE),     numParameters = -1L), <pointer: 0x511000153280>, <pointer: 0x503000047050>,     .pointer)
   2: ds$infoAsJSON()
...

@ctoney ctoney merged commit ba57862 into USDAForestService:main May 29, 2025
9 checks passed
@ctoney ctoney deleted the fix_asan branch June 3, 2025 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0