8051398: jvmti tests fieldacc002, fieldmod002 fail in nightly with errors: (watch#0) wrong location

Didn't handle NULL bcp for native methods

Reviewed-by: dcubed, sspitsyn
This commit is contained in:
Coleen Phillimore 2014-07-31 00:50:55 +00:00
parent 037f9fdccf
commit d230f0b4fd
4 changed files with 11 additions and 13 deletions

View file

@ -283,6 +283,13 @@ address Method::bcp_from(int bci) const {
return bcp;
}
address Method::bcp_from(address bcp) const {
if (is_native() && bcp == NULL) {
return code_base();
} else {
return bcp;
}
}
int Method::size(bool is_native) {
// If native, then include pointers for native_function and signature_handler