Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-12 Thread Alex Menkov
s. > > Testing: > - tier1,tier2,hs-tier5-svc; > - redefineClasses/retransformClasses tests: >- test/jdk/java/lang/instrument >- test/hotspot/jtreg/serviceability/jvmti/RedefineClasses >- test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses >- test/hotspot/

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v2]

2024-03-11 Thread Alex Menkov
On Sat, 9 Mar 2024 03:29:26 GMT, Guoxiong Li wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> typo > > test/jdk/java/lang/instrument/RetransformRecordAnnotation.java line 27: >

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v2]

2024-03-11 Thread Alex Menkov
t/hotspot/jtreg/serviceability/jvmti/RedefineClasses >- test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses >- test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses Alex Menkov has updated the pull request incrementally with one additional commit since the last revision: ty

RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE

2024-03-07 Thread Alex Menkov
RecordComponent class has _attributes_count field. The only user of the field is JvmtiClassFileReconstituter. Incorrect value of the field causes producing incorrect data for Record attribute. Parsing Record attribute ClassFileParser skips unknown attributes and may skip

RFR: JDK-8326525: com/sun/tools/attach/BasicTests.java does not verify AgentLoadException case

2024-02-22 Thread Alex Menkov
The change updates the test to throw an exception if expected AgentLoadException is not thrown - Commit messages: - fix Changes: https://git.openjdk.org/jdk/pull/17971/files Webrev: https://webrevs.openjdk.org/?repo=jdk=17971=00 Issue:

Re: RFR: JDK-8325530: Vague error message when com.sun.tools.attach.VirtualMachine fails to load agent library [v2]

2024-02-21 Thread Alex Menkov
ge. > Walking through the code, fixed some other minor things in attach listener > and attach API implementation (commented in the code) > > Testing: > - test/jdk/com/sun/tools; > - tier1,tier2,tier5-svc Alex Menkov has updated the pull request incrementally with one additional com

Re: RFR: JDK-8325530: Vague error message when com.sun.tools.attach.VirtualMachine fails to load agent library

2024-02-21 Thread Alex Menkov
On Wed, 21 Feb 2024 21:16:46 GMT, Alex Menkov wrote: >> VirtualMachine.loadAgentPath/loadAgentLibrary can fail with >> AgentLoadException in 2 cases: >> - attach listener returns error; in the case the exception is thrown from >> HotSpotVirtualMachine.processCompl

Re: RFR: JDK-8325530: Vague error message when com.sun.tools.attach.VirtualMachine fails to load agent library

2024-02-21 Thread Alex Menkov
On Wed, 21 Feb 2024 21:13:36 GMT, Alex Menkov wrote: > VirtualMachine.loadAgentPath/loadAgentLibrary can fail with > AgentLoadException in 2 cases: > - attach listener returns error; in the case the exception is thrown from > HotSpotVirtualMachine.processCompletionStatus

RFR: JDK-8325530: Vague error message when com.sun.tools.attach.VirtualMachine fails to load agent library

2024-02-21 Thread Alex Menkov
VirtualMachine.loadAgentPath/loadAgentLibrary can fail with AgentLoadException in 2 cases: - attach listener returns error; in the case the exception is thrown from HotSpotVirtualMachine.processCompletionStatus (called from HotSpotVirtualMachine.execute); - attach listener returns success, but

Re: RFR: 8309334: ProcessTools.main() does not properly set thread names when using the virtual thread wrapper

2023-06-02 Thread Alex Menkov
On Fri, 2 Jun 2023 21:30:46 GMT, Chris Plummer wrote: > Normally when a virtual thread wrapper is used to run a test, the main thread > is renamed to "old-m-a-i-n" and the new virtual thread that will act as the > main thread is named "main". Neither is being done by `ProcessTools.main()`. >

Re: RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-08 Thread Alex Menkov
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

RFR: 8289561: java/lang/instrument/NativeMethodPrefixAgent.java fails with "ERROR: Injection failure: java.lang.UnsupportedOperationException: Records requires ASM8"

2022-10-05 Thread Alex Menkov
Test failure is a duplicate of [JDK-8284777](https://bugs.openjdk.org/browse/JDK-8284777), but the test needs to be updated: - the test instruments all loaded classes, so need to updated ASM version to support records and permits; Instrumentor.addNativeMethodTrackingInjection is used only by

Re: RFR: 8292350: Use static methods for hashCode/toString primitives

2022-08-19 Thread Alex Menkov
On Wed, 10 Aug 2022 08:01:41 GMT, Andrey Turbanov wrote: > It's a bit shorter and clearer. Marked as reviewed by amenkov (Reviewer). - PR: https://git.openjdk.org/jdk/pull/9816