RFR: 8361955: [GCC static analyzer] libjdwp/threadControl.c threadControl_setPendingInterrupt error: dereference of NULL 'node'

David Holmes dholmes at openjdk.org
Fri Sep 19 12:47:33 UTC 2025


On Fri, 19 Sep 2025 04:47:15 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Fix gcc static analyzer warning. It was introduced by [JDK-8324868](https://bugs.openjdk.org/browse/JDK-8324868) early last year. For the most part the fix is to revert the relevant [JDK-8324868](https://bugs.openjdk.org/browse/JDK-8324868) changes, except for leaving in the replacement of calling findThread() with instead calling findRunningThread().
>> 
>> Ran all svc tier2 and tier5 tests.
>
> It fixes the warning but surely impossible to be calling this function in such circumstances?
> 
> Static analyzers often lack context that would tell them something can't be null. Normally, in main hotspot code, asserts seem to do the job of telling the analyzer this.

> @dholmes-ora Can you read through the CR? There are more details there on why in the end I decided to go ahead and make this change.

Okay I see the full story now.

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

PR Comment: https://git.openjdk.org/jdk/pull/27378#issuecomment-3312060939


More information about the serviceability-dev mailing list