-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8331428: ubsan: JVM flag checking complains about MaxTenuringThresholdConstraintFunc, InitialTenuringThresholdConstraintFunc and AllocatePrefetchStepSizeConstraintFunc #19074
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Thanks for the reviews ! /integrate |
Going to push as commit 9697bc3.
Your commit was automatically rebased without conflicts. |
Seems MaxTenuringThresholdConstraintFunc, InitialTenuringThresholdConstraintFunc and AllocatePrefetchStepSizeConstraintFunc check uint values (see gc_globals.hpp). However those functions have uintx in the check functions.
This causes Ubsan to complain :
/jdk/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:176:12: runtime error: call to function MaxTenuringThresholdConstraintFunc(unsigned long, bool) through pointer to incorrect function type 'JVMFlag::Error ()(unsigned int, bool)'
jvmFlagConstraintsGC.cpp:188: note: MaxTenuringThresholdConstraintFunc(unsigned long, bool) defined here
#0 0x10541cfbe in FlagAccessImpl_uint::typed_check_constraint(void, unsigned int, bool) const jvmFlagAccess.cpp:176
#1 0x1054253d7 in JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase) jvmFlagLimit.cpp:179
#2 0x105f20b98 in Threads::create_vm(JavaVMInitArgs*, bool*) threads.cpp:471
#3 0x10538c3fb in JNI_CreateJavaVM_inner(JavaVM_, void, void*) jni.cpp:3581
#4 0x10342e71c in JavaMain java.c:491
#5 0x103435248 in ThreadJavaMain java_md_macosx.m:720
#6 0x7fff204338fb in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x68fb)
#7 0x7fff2042f442 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x2442)
/jdk/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:176:12: runtime error: call to function InitialTenuringThresholdConstraintFunc(unsigned long, bool) through pointer to incorrect function type 'JVMFlag::Error ()(unsigned int, bool)'
jvmFlagConstraintsGC.cpp:177: note: InitialTenuringThresholdConstraintFunc(unsigned long, bool) defined here
#0 0x117b1cfbe in FlagAccessImpl_uint::typed_check_constraint(void, unsigned int, bool) const jvmFlagAccess.cpp:176
#1 0x117b253d7 in JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase) jvmFlagLimit.cpp:179
#2 0x118620b98 in Threads::create_vm(JavaVMInitArgs*, bool*) threads.cpp:471
#3 0x117a8c3fb in JNI_CreateJavaVM_inner(JavaVM_, void, void*) jni.cpp:3581
#4 0x10077e71c in JavaMain java.c:491
#5 0x100785248 in ThreadJavaMain java_md_macosx.m:720
#6 0x7fff204338fb in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x68fb)
#7 0x7fff2042f442 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x2442)
and
/jdk/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:157:12: runtime error: call to function AllocatePrefetchStepSizeConstraintFunc(long, bool) through pointer to incorrect function type 'JVMFlag::Error ()(int, bool)'
jvmFlagConstraintsCompiler.cpp:70: note: AllocatePrefetchStepSizeConstraintFunc(long, bool) defined here
#0 0x10239bcee in FlagAccessImpl_int::typed_check_constraint(void, int, bool) const jvmFlagAccess.cpp:157
#1 0x1023a53d7 in JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase) jvmFlagLimit.cpp:179
#2 0x102ee640b in universe_init() universe.cpp:875
#3 0x10213ee27 in init_globals() init.cpp:128
#4 0x102ea0d69 in Threads::create_vm(JavaVMInitArgs*, bool*) threads.cpp:553
#5 0x10230c3fb in JNI_CreateJavaVM_inner(JavaVM_, void, void*) jni.cpp:3581
#6 0x10041271c in JavaMain java.c:491
#7 0x100419248 in ThreadJavaMain java_md_macosx.m:720
#8 0x7fff204338fb in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x68fb)
#9 0x7fff2042f442 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x2442)
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19074/head:pull/19074
$ git checkout pull/19074
Update a local copy of the PR:
$ git checkout pull/19074
$ git pull https://git.openjdk.org/jdk.git pull/19074/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19074
View PR using the GUI difftool:
$ git pr show -t 19074
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19074.diff
Webrev
Link to Webrev Comment