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

JEP471 sets system property according to the command line option value #19647

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Jun 6, 2024

JEP471 sets system property according to the command line option value

--sun-misc-unsafe-memory-access=value which is expected to be "allow", "warn", "debug" or "deny";
Set a system property sun.misc.unsafe.memory.access with the value specified via --sun-misc-unsafe-memory-access=value.

Verified locally that sun/misc/UnsafeMemoryAccessWarnings.java passes.

issue #19583

Signed-off-by: Jason Feng fengj@ca.ibm.com

--sun-misc-unsafe-memory-access=value which is expected to be "allow",
"warn", "debug" or "deny";
Set a system property sun.misc.unsafe.memory.access with the value
specified via --sun-misc-unsafe-memory-access=value.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented Jun 6, 2024

I removed the closes keyword. #19583 shouldn't be closed until the test is unexcluded.

@JasonFengJ9
Copy link
Member Author

Sure, the un-exclude PR is in draft currently

@tajila
Copy link
Contributor

tajila commented Jun 10, 2024

jenkins test sanity win jdk8

@tajila
Copy link
Contributor

tajila commented Jun 10, 2024

jenkins test sanity alinux64 jdknext

@tajila
Copy link
Contributor

tajila commented Jun 10, 2024

I do find it a bit odd that the args aren't consumed in java.c like the rest (ie. --enable-native-access, --add-modules, ...)

@JasonFengJ9
Copy link
Member Author

I do find it a bit odd that the args aren't consumed in java.c like the rest (ie. --enable-native-access, --add-modules, ...)

For --enable-native-access

435 					CONSUME_ARG(j9vm_args, argIndex);
  * frame #0: 0x0000000100922418 libj9vm29.dylib`addPropertiesForOptionWithAssignArg(vm=0x000000012c818e20, optionName="--enable-native-access", optionNameLen=22, basePropName="jdk.module.enable.native.access.", basePropNameLen=32, propertyCount=0x0000000000000000) at vmprops.c:435:5
    frame #1: 0x00000001009210e4 libj9vm29.dylib`addModularitySystemProperties(vm=0x000000012c818e20) at vmprops.c:526:7
    frame #2: 0x00000001009200b0 libj9vm29.dylib`initializeSystemProperties(vm=0x000000012c818e20) at vmprops.c:618:8
    frame #3: 0x00000001008d2bf8 libj9vm29.dylib`protectedInitializeJavaVM(portLibrary=0x0000000100139fa8, userData=0x000000016fece630) at jvminit.c:7377:30
    frame #4: 0x000000010024f1dc libj9prt29.dylib`omrsig_protect(portLibrary=0x0000000100139fa8, fn=(libj9vm29.dylib`protectedInitializeJavaVM at jvminit.c:7105), fn_arg=0x000000016fece630, handler=(libj9vm29.dylib`structuredSignalHandlerVM at gphandle.c:681), handler_arg=0x000000012c818e20, flags=506, result=0x000000016fece620) at omrsignal.c:425:12
    frame #5: 0x00000001008d1d84 libj9vm29.dylib`initializeJavaVM(osMainThread=0x000000012c811650, vmPtr=0x000000010013c720, createParams=0x000000016fece8d0) at jvminit.c:1220:11
    frame #6: 0x00000001008c7fd0 libj9vm29.dylib`J9_CreateJavaVM(p_vm=0x000000010013c720, p_env=0x000000016fecef40, createParams=0x000000016fece8d0) at jniinv.c:152:16
    frame #7: 0x0000000100102980 libjvm.dylib`JNI_CreateJavaVM_impl(pvm=0x000000016fecef48, penv=0x000000016fecef40, vm_args=0x000060000330c900, isJITServer=0) at jvm.c:2387:11
    frame #8: 0x0000000100101fe4 libjvm.dylib`JNI_CreateJavaVM(pvm=0x000000016fecef48, penv=0x000000016fecef40, vm_args=0x000060000330c900) at jvm.c:1809:9
    frame #9: 0x00000001000503f0 libjvm.dylib`JNI_CreateJavaVM(pvm=0x000000016fecef48, penv=0x000000016fecef40, vm_args=0x000000016feceea0) at redirector.c:805:11
    frame #10: 0x000000010049ee34 libjli.dylib`InitializeJVM(pvm=0x000000016fecef48, penv=0x000000016fecef40, ifn=0x000000016fecef50) at java.c:1630:9
    frame #11: 0x000000010049df74 libjli.dylib`JavaMain(_args=0x000000016fe85bb0) at java.c:559:10
    frame #12: 0x00000001004a38c8 libjli.dylib`ThreadJavaMain(args=0x000000016fe85bb0) at java_md_macosx.m:720:29
    frame #13: 0x000000018b4bef94 libsystem_pthread.dylib`_pthread_start + 136

--add-modules is consumed in a similar stacktrace.

@tajila tajila merged commit 0fa41f8 into eclipse-openj9:master Jun 11, 2024
5 checks passed
@JasonFengJ9 JasonFengJ9 deleted the jep471 branch June 11, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants