8217467: Access barriers are missing in C2 intrinsic for Base64

Reviewed-by: thartmann, roland, rkennke, kvn
This commit is contained in:
Aleksey Shipilev 2019-01-22 21:18:25 +01:00
parent 755d163e91
commit 17341dad94
2 changed files with 8 additions and 0 deletions

View File

@ -1023,6 +1023,9 @@ void ShenandoahBarrierNode::verify(RootNode* root) {
"sha512_implCompressMB",
{ { TypeFunc::Parms, ShenandoahLoad }, { TypeFunc::Parms+1, ShenandoahStore }, { -1, ShenandoahNone },
{ -1, ShenandoahNone}, { -1, ShenandoahNone}, { -1, ShenandoahNone} },
"encodeBlock",
{ { TypeFunc::Parms, ShenandoahLoad }, { TypeFunc::Parms+3, ShenandoahStore }, { -1, ShenandoahNone },
{ -1, ShenandoahNone}, { -1, ShenandoahNone}, { -1, ShenandoahNone} },
};
if (call->is_call_to_arraycopystub()) {

View File

@ -6260,6 +6260,11 @@ bool LibraryCallKit::inline_base64_encodeBlock() {
Node* dp = argument(5);
Node* isURL = argument(6);
src = must_be_not_null(src, true);
src = access_resolve(src, ACCESS_READ);
dest = must_be_not_null(dest, true);
dest = access_resolve(dest, ACCESS_WRITE);
Node* src_start = array_element_address(src, intcon(0), T_BYTE);
assert(src_start, "source array is NULL");
Node* dest_start = array_element_address(dest, intcon(0), T_BYTE);