Todd Lipcon has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/11181 )

Change subject: IMPALA-7421. Static methods use wrong JNI call function
......................................................................

IMPALA-7421. Static methods use wrong JNI call function

Various places throughout the code were using the JNI CallObjectMethod
function when in fact they should have been using
CallStaticObjectMethod. It appears that this doesn't cause crashes in
release builds, but if running with -Xcheck:jni, it causes an assertion
failure:

   guarantee(method->size_of_parameters() == size_of_parameters())
      failed: wrong no. of arguments pushed

This patch cleans up JniUtil a bit to add a "fluent" style utility for
calling JNI functions. This calling style should make the above mistake
more obvious because it forces the caller to write 'on_class(...)' for
static methods and 'on_instance(...)' for instance methods.

Change-Id: If7cde6ca91613b63afe5307f4d819fb24cb17fd6
Reviewed-on: http://gerrit.cloudera.org:8080/11181
Reviewed-by: Bharath Vissapragada <bhara...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
M be/src/common/init.cc
M be/src/common/status.h
M be/src/service/fe-support.h
M be/src/service/frontend.cc
M be/src/util/backend-gflag-util.h
M be/src/util/jni-util.cc
M be/src/util/jni-util.h
M be/src/util/logging-support.cc
M be/src/util/logging-support.h
M be/src/util/zip-util.cc
M be/src/util/zip-util.h
11 files changed, 224 insertions(+), 100 deletions(-)

Approvals:
  Bharath Vissapragada: Looks good to me, approved
  Impala Public Jenkins: Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If7cde6ca91613b63afe5307f4d819fb24cb17fd6
Gerrit-Change-Number: 11181
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to