impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tianyi Wang (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-6060: Check the return value of JNI exception handling functions
Date Mon, 23 Oct 2017 17:46:26 GMT
Tianyi Wang has posted comments on this change. ( http://gerrit.cloudera.org:8080/8334 )

Change subject: IMPALA-6060: Check the return value of JNI exception handling functions
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8334/1/be/src/util/jni-util.h
File be/src/util/jni-util.h:

http://gerrit.cloudera.org:8080/#/c/8334/1/be/src/util/jni-util.h@159
PS1, Line 159:   /// lives as long as this guard. jstr should not be null.
> Usually such a comment indicates a precondition, but in this case a nullptr
Done


http://gerrit.cloudera.org:8080/#/c/8334/1/be/src/util/jni-util.cc
File be/src/util/jni-util.cc:

http://gerrit.cloudera.org:8080/#/c/8334/1/be/src/util/jni-util.cc@30
PS1, Line 30: Status JniUtfCharGuard::create(JNIEnv* env, jstring jstr, JniUtfCharGuard* out)
{
> fix pointer style while you are here: JNIEnv* env, etc.
Done


http://gerrit.cloudera.org:8080/#/c/8334/1/be/src/util/jni-util.cc@197
PS1, Line 197:   }
> RETURN_ERROR_IF_EXC calls GetJniExceptionMsg.
RETURN_ERROR_IF_EXC will call GetJniExceptionMsg again, which will result in an infinite recursion.
And we may want to do some logging here since it is critical.


http://gerrit.cloudera.org:8080/#/c/8334/1/be/src/util/jni-util.cc@208
PS1, Line 208:     }
> same here, I think the right fix is to add a RETURN_ERROR_IF_EXC(env);
See above.



-- 
To view, visit http://gerrit.cloudera.org:8080/8334
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3ed88bf8739c56a066f2402727c8204e96aa116
Gerrit-Change-Number: 8334
Gerrit-PatchSet: 2
Gerrit-Owner: Tianyi Wang <twang@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <twang@cloudera.com>
Gerrit-Comment-Date: Mon, 23 Oct 2017 17:46:26 +0000
Gerrit-HasComments: Yes

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message