Re: RFR: 8362304: Fix JDWP spec w.r.t. OPAQUE_FRAME and INVALID_SLOT errors [v2]

2025-07-21 Thread Chris Plummer
> StackFrame.SetValues, StackFrame.GetValues, ThreadReference.PopFrames, and > ThreadReference.ForceEarlyReturn all need updated language related to > OPAQUE_FRAME error. > > (1) The spec for JVMTI says the following for GetLocalsXXX and SetLocalsXXX > > The implementation is unable to set th

Re: RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread [v2]

2025-07-21 Thread David Holmes
> The `cv_internal_thread_to_JavaThread` method will now check if the thread is > a mounted virtual thread, and if so protect the carrier thread. User's of the > API that need to deal with virtual threads must still check the carrier > themselves as it could change asynchronously, but it is now

Re: RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread

2025-07-21 Thread David Holmes
On Mon, 21 Jul 2025 22:07:38 GMT, Alex Menkov wrote: >> This code does not document/describe >> `JvmtiExport::cv_external_thread_to_JavaThread`. > > This is common comment which describes 2 ways to get protected JavaThread, so > to me it looks like it describes both (the rest of the comment is

Re: RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread

2025-07-21 Thread Alex Menkov
On Mon, 21 Jul 2025 21:43:02 GMT, David Holmes wrote: >> src/hotspot/share/runtime/threadSMR.hpp line 78: >> >>> 76: // longer protected by a ThreadsListHandle. >>> 77: // >>> 78: // Note that for virtual threads, we obtain a reference to the carrier >>> JavaThread >> >> This is not correct fo

Re: RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread

2025-07-21 Thread David Holmes
On Mon, 21 Jul 2025 18:42:14 GMT, Alex Menkov wrote: >> The `cv_internal_thread_to_JavaThread` method will now check if the thread >> is a mounted virtual thread, and if so protect the carrier thread. User's of >> the API that need to deal with virtual threads must still check the carrier >> t

Re: RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread

2025-07-21 Thread Alex Menkov
On Mon, 14 Jul 2025 05:34:57 GMT, David Holmes wrote: > The `cv_internal_thread_to_JavaThread` method will now check if the thread is > a mounted virtual thread, and if so protect the carrier thread. User's of the > API that need to deal with virtual threads must still check the carrier > them

Integrated: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note

2025-07-21 Thread Lei Zhu
On Sat, 19 Jul 2025 18:08:03 GMT, Lei Zhu wrote: > Free the `buf` before the early return. This pull request has now been integrated. Changeset: 644e400c Author:Lei Zhu Committer: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/644e400cd1f8a80df01b4f1755450f86709485f4 Stat

Re: RFR: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note [v2]

2025-07-21 Thread duke
On Mon, 21 Jul 2025 10:17:31 GMT, Lei Zhu wrote: >> Free the `buf` before the early return. > > Lei Zhu has updated the pull request incrementally with one additional commit > since the last revision: > > goto err @Korov Your change (at version 470a463c23af48a1646052dad624044028f60155) is n

Re: RFR: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note [v2]

2025-07-21 Thread David Holmes
On Mon, 21 Jul 2025 10:17:31 GMT, Lei Zhu wrote: >> Free the `buf` before the early return. > > Lei Zhu has updated the pull request incrementally with one additional commit > since the last revision: > > goto err Thanks for the update. - Marked as reviewed by dholmes (Reviewer

Re: RFR: 8362304: Fix JDWP spec w.r.t. OPAQUE_FRAME and INVALID_SLOT errors

2025-07-21 Thread Alan Bateman
On Tue, 15 Jul 2025 22:50:00 GMT, Chris Plummer wrote: > StackFrame.SetValues, StackFrame.GetValues, ThreadReference.PopFrames, and > ThreadReference.ForceEarlyReturn all need updated language related to > OPAQUE_FRAME error. > > (1) The spec for JVMTI says the following for GetLocalsXXX and S

Re: RFR: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note [v2]

2025-07-21 Thread Lei Zhu
> Free the `buf` before the early return. Lei Zhu has updated the pull request incrementally with one additional commit since the last revision: goto err - Changes: - all: https://git.openjdk.org/jdk/pull/26403/files - new: https://git.openjdk.org/jdk/pull/26403/files/bf53540

Re: RFR: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note [v2]

2025-07-21 Thread Lei Zhu
On Mon, 21 Jul 2025 07:31:07 GMT, David Holmes wrote: >> Lei Zhu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> goto err > > src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c line 290: > >> 288: print_error("failed to ha

RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread

2025-07-21 Thread David Holmes
The `cv_internal_thread_to_JavaThread` method will now check if the thread is a mounted virtual thread, and if so protect the carrier thread. User's of the API that need to deal with virtual threads must still check the carrier themselves as it could change asynchronously, but it is now guarante

Re: RFR: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note

2025-07-21 Thread David Holmes
On Sat, 19 Jul 2025 18:08:03 GMT, Lei Zhu wrote: > Free the `buf` before the early return. Changes requested by dholmes (Reviewer). src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c line 290: > 288: print_error("failed to handle NT_PRSTATUS note\n"); > 289: free(buf);

Re: RFR: 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note

2025-07-21 Thread Matthias Baesken
On Sat, 19 Jul 2025 18:08:03 GMT, Lei Zhu wrote: > Free the `buf` before the early return. Marked as reviewed by mbaesken (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/26403#pullrequestreview-3036821556