-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8347463: jdk/jfr/threading/TestManyVirtualThreads.java crashes with assert(oopDesc::is_oop_or_null(val)) #27913
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
39922ef
Runtime call had void type but actually returned an object
anton-seoane 2c1c8cf
Change to a more specific type
anton-seoane a6225eb
Merge branch 'openjdk:master' into JDK-8347463
anton-seoane 4b322a3
Test for JDK-8347463
anton-seoane f25723c
Documentation for future similar cases
anton-seoane df0fa4c
Merge branch 'JDK-8347463' of github.com:anton-seoane/jdk into JDK-83…
anton-seoane c85142e
Merge branch 'openjdk:master' into JDK-8347463
anton-seoane 51fb388
Update src/hotspot/share/opto/runtime.hpp
anton-seoane e91cd48
Update test/hotspot/jtreg/compiler/intrinsics/TestReturnsOopSetForJFR…
anton-seoane 9191c3b
Apply review comments
anton-seoane 280141b
Update test/hotspot/jtreg/compiler/intrinsics/TestReturnsOopSetForJFR…
anton-seoane 922d03f
Change test method name
anton-seoane 9ff84e7
Revert to failOn check as getEventWriter is not always inlined
anton-seoane aa09c1b
Adjust comment
anton-seoane 1f92256
Rename test and update comments
anton-seoane 80f572a
Rename class
anton-seoane 72202ad
Final renaming touches
anton-seoane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
test/hotspot/jtreg/compiler/intrinsics/TestReturnOopSetForJFRWriteCheckpoint.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| /* | ||
| * Copyright (c) 2025, 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 | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
| * or visit www.oracle.com if you need additional information or have any | ||
| * questions. | ||
| */ | ||
|
|
||
| package compiler.intrinsics; | ||
|
|
||
| import compiler.lib.ir_framework.*; | ||
|
|
||
| import jdk.jfr.Event; | ||
| import jdk.jfr.Recording; | ||
|
|
||
| /** | ||
| * @test | ||
| * @summary Tests that the getEventWriter call to write_checkpoint correctly | ||
anton-seoane marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * reports returning an oop | ||
| * @bug 8347463 | ||
| * @requires vm.hasJFR | ||
| * @library /test/lib / | ||
| * @run driver compiler.intrinsics.TestReturnOopSetForJFRWriteCheckpoint | ||
| */ | ||
| public class TestReturnOopSetForJFRWriteCheckpoint { | ||
|
|
||
| private static class TestEvent extends Event { | ||
| } | ||
|
|
||
| public static void main(String... args) { | ||
| TestFramework.run(); | ||
| } | ||
|
|
||
| // Crash was due to the return_oop field not being set | ||
| // for the write_checkpoint call. Instead of explicitly checking for | ||
| // it, we look for an non-void return type (which comes hand-in-hand | ||
| // with the return_oop information). | ||
| @Test | ||
| @IR(failOn = { IRNode.STATIC_CALL_OF_METHOD, "write_checkpoint.*void"}) | ||
| public void testWriteCheckpointReturnType() { | ||
| try (Recording r = new Recording()) { | ||
| r.start(); | ||
| emitEvent(); | ||
| } | ||
| } | ||
|
|
||
| @ForceInline | ||
| public void emitEvent() { | ||
| TestEvent t = new TestEvent(); | ||
| t.commit(); | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering why this is only a problem for deoptimization, and not regular safepoints that trigger a GC. But the comment in rematerialize_objects() explains that the return value is not part of the GC oopmap.