From ce0be30b49d9ce119dbfb7b433ec1f2a53b76ca1 Mon Sep 17 00:00:00 2001 From: Jean-Romain Date: Wed, 11 Apr 2018 14:39:50 -0400 Subject: [PATCH] #18 disable GeoAsciiParamsTag and WKT OGC MATH TRANSFORM. This is expected to fix gcc ASAN error Former-commit-id: d9968d6a719d1b562bdf9cd6bb018767d6403870 --- cran-comments.md | 9 +++++++++ src/readheader.cpp | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 39073f0..bdecef0 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,12 @@ +This is an early release because ASAN and USBAN raised additionnal error. + +* clang ASAN/USBAN: the code now ensures that NAs will no be casted to int +* gcc ASAN: I disable minor features because I was not able to fix this error + +To be honnest I can't swear that these additional errors are fixed because I was not able +to reproduce. I try to reproduce with `rhub::check_with_sanitizer()` but tests were ok. +I have not been able to compile with sanitizer myself. Thus I only guess the error are fixed. + ## Test environments * Linux Mint 18 (Ubuntu 16.04), R 3.4.4, g++ -std=gnu++11 * Linux Mint 18 (Ubuntu 16.04), R 3.4.4, g++-7 -std=gnu++11 diff --git a/src/readheader.cpp b/src/readheader.cpp index 07111a3..9ec4488 100644 --- a/src/readheader.cpp +++ b/src/readheader.cpp @@ -212,19 +212,22 @@ List vlrsreader(LASheader* lasheader) } else if (vlr.record_id == 34737) // GeoAsciiParamsTag { - lvlr.push_back(std::string(reinterpret_cast< char const* >(vlr.data))); + //lvlr.push_back(std::string(reinterpret_cast< char const* >(vlr.data))) + lvlr.push_back("The reading of this information is not yet supported by rlas"); lvlrnames.push_back("tags"); lvlrsnames.push_back("GeoAsciiParamsTag"); } else if (vlr.record_id == 2111) // WKT OGC MATH TRANSFORM { - lvlr.push_back(std::string(reinterpret_cast< char const* >(vlr.data))); + //lvlr.push_back(std::string(reinterpret_cast< char const* >(vlr.data))) + lvlr.push_back("The reading of this information is not yet supported by rlas"); lvlrnames.push_back("WKT OGC MATH TRANSFORM"); lvlrsnames.push_back("WKT OGC MT"); } else if (vlr.record_id == 2112) // WKT OGC COORDINATE SYSTEM { - lvlr.push_back(std::string(reinterpret_cast< char const* >(vlr.data))); + //lvlr.push_back(std::string(reinterpret_cast< char const* >(vlr.data))) + lvlr.push_back("The reading of this information is not yet supported by rlas"); lvlrnames.push_back("WKT OGC COORDINATE SYSTEM"); lvlrsnames.push_back("WKT OGC CS"); }