RFR: JDK-8319784: VM crash during heap dump after JDK-8287061 [v2]

Aleksey Shipilev shade at openjdk.org
Mon Nov 20 12:09:33 UTC 2023


On Wed, 15 Nov 2023 21:53:45 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:

>> This fixes an incorrect assert in `debugInfo.hpp`. The assert is incorrect because this method may be called before rematerialization of the ObjectValue takes place, and therefore, `_selected` will be nullptr. This pull request patches the method to just return `Handle() => nullptr` if the rematerialization of the object hasn't taken place yet. This is the same behavior used by scalar-replaced objects not participating in merges.
>> 
>> I added a test to reproduce a scenario where the assert was causing a problem.
>> 
>> Tested on Ubuntu/MacOS/Windows x86_64 tier1-4.
>
> Cesar Soares Lucas has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address PR feedback: improve test to not let lingering heapdump files.

Good. I have just a few cosmetic suggestions.

test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java line 47:

> 45:             }
> 46: 
> 47:             String[] dumper_args = {

Java style: `dumperArgs`

test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java line 79:

> 77: 
> 78:     public static void main(String[] args) throws Exception {
> 79:         for (int i=0; i<5000; i++) {

Suggestion:

        for (int i = 0; i < 5000; i++) {

-------------

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16622#pullrequestreview-1739663257
PR Review Comment: https://git.openjdk.org/jdk/pull/16622#discussion_r1399109903
PR Review Comment: https://git.openjdk.org/jdk/pull/16622#discussion_r1399110243


More information about the hotspot-compiler-dev mailing list