On Tue, 25 Nov 2025 20:47:26 GMT, Chris Plummer <[email protected]> wrote:
>> There is a bug in the call to eventHandlerRestricted_iterator() at line >> 1436. For VIRTUAL_THREAD_START I should be explicitly passing in NULL for >> the thread. Otherwise it will consider the thread when deciding if other >> event handlers are a match to this one, and I don't think we want that. It >> could lead to disabling VIRTUAL_THREAD_START events when we shouldn't. Seems >> we don't have any tests for this but I modified an existing test and got a >> failure. The test creates a ThreadStartRequest with a thread filter and >> expects that to trigger a ThreadStartEvent for the filter thread. If I >> create a second ThreadStartRequest with a filter on a different thread, >> enable it, and then disable it, that ends up disabling all >> VIRTUAL_THREAD_START events, and the expected event never arrives. Passing >> NULL fixes the problem. > > Ok, the last problem I pointed out is fixed now. The fix was done in > matchHasNoPlatformThreadsOnlyFilter(). I was going to pass NULL for "thread" > when ei == EI_THREAD_START, but this turned out not to be enough and changes > were also needed in matchHasNoPlatformThreadsOnlyFilter(). Once those changes > were in place there was no longer a need to pass NULL for "thread". Sorry, I know that but keep forgetting that `ThreadStart` can not be thread-filtered. :) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28485#discussion_r2561717917
