You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/17 15:36:25 UTC

[GitHub] [arrow] kou opened a new issue, #33723: [C++] re2::RE2::RE2() result must be checked

kou opened a new issue, #33723:
URL: https://github.com/apache/arrow/issues/33723

   ### Describe the enhancement requested
   
   `re2::RE2::RE2()` may be failed. We should check the `re2::RE2::RE2()` result with `re2::RE2::ok()`.
   
   For example:
   
   ```diff
   diff --git a/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc b/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
   index d3d0ac3201..b2b9d47c02 100644
   --- a/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
   +++ b/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
   @@ -1681,6 +1681,10 @@ struct FindSubstringRegex {
    
      template <typename OutValue, typename... Ignored>
      OutValue Call(KernelContext*, std::string_view val, Status*) const {
   +    if (!regex_match_->ok()) {
   +      // TODO: Report error
   +      return -1;
   +    }
        re2::StringPiece piece(val.data(), val.length());
        re2::StringPiece match;
        if (RE2::PartialMatch(piece, *regex_match_, &match)) {
   ```
   
   Gandiva also doesn't check `re2::RE2::RE2()` result.
   
   If `re2::RE2::RE2()` is failed, a program is crashed like #25633 .
   
   ### Component(s)
   
   C++, C++ - Gandiva


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou closed issue #33723: [C++] re2::RE2::RE2() result must be checked

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #33723: [C++] re2::RE2::RE2() result must be checked
URL: https://github.com/apache/arrow/issues/33723


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] js8544 commented on issue #33723: [C++] re2::RE2::RE2() result must be checked

Posted by GitBox <gi...@apache.org>.
js8544 commented on issue #33723:
URL: https://github.com/apache/arrow/issues/33723#issuecomment-1386443239

   Hi @kou, are you working on this? If not I can take it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #33723: [C++] re2::RE2::RE2() result must be checked

Posted by GitBox <gi...@apache.org>.
kou commented on issue #33723:
URL: https://github.com/apache/arrow/issues/33723#issuecomment-1387267866

   No. I'm not working on this. Could you work on this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org