Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8287362: FieldAccessWatch testcase failed on AIX platform #1112

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@ Agent_OnLoad(JavaVM* vm,
void* reserved) {

jvmtiCapabilities capa;
jvmtiEventCallbacks cbs = {0};
jvmtiEventCallbacks cbs;

(*vm)->GetEnv(vm, (void**)&jvmti, JVMTI_VERSION_1_0);

@@ -110,6 +110,7 @@ Agent_OnLoad(JavaVM* vm,
capa.can_generate_single_step_events = 1;
(*jvmti)->AddCapabilities(jvmti, &capa);

memset(&cbs, 0, sizeof(cbs));
cbs.ClassPrepare = classprepare;
cbs.Breakpoint = breakpoint;
(*jvmti)->SetEventCallbacks(jvmti, &cbs, sizeof(cbs));
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -208,14 +208,15 @@ JNIEXPORT jint JNICALL
Agent_OnLoad(JavaVM *jvm, char *options, void *reserved)
{
jvmtiError err;
jvmtiCapabilities caps = {0};
jvmtiEventCallbacks callbacks = {0};
jvmtiCapabilities caps;
jvmtiEventCallbacks callbacks;
jint res = (*jvm)->GetEnv(jvm, (void **) &jvmti, JVMTI_VERSION_1_1);
if (res != JNI_OK || jvmti == NULL) {
reportError("GetEnv failed", res);
return JNI_ERR;
}

memset(&caps, 0, sizeof(caps));
caps.can_generate_field_modification_events = 1;
caps.can_generate_field_access_events = 1;
caps.can_tag_objects = 1;
@@ -225,6 +226,7 @@ Agent_OnLoad(JavaVM *jvm, char *options, void *reserved)
return JNI_ERR;
}

memset(&callbacks, 0, sizeof(callbacks));
callbacks.FieldModification = &onFieldModification;
callbacks.FieldAccess = &onFieldAccess;