RFR: 8326716: JVMTI spec: clarify what nullptr means for C/C++ developers

Chris Plummer cjplummer at openjdk.org
Thu May 16 19:29:05 UTC 2024


On Thu, 16 May 2024 07:57:58 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> The following RFE was fixed recently:
>> [8324680](https://bugs.openjdk.org/browse/JDK-8324680): Replace NULL with nullptr in JVMTI generated code
>> 
>> It replaced all the `NULL`'s in the generated spec with`nullptr`. JVMTI agents can be developed in C or C++.
>> This update is to make it clear that `nullptr` is C programming language `null` pointer.
>> 
>> I think we do not need a CSR for this fix.
>> 
>> Testing: N/A (not needed)
>
> src/hotspot/share/prims/jvmti.xml line 1008:
> 
>> 1006:     function descriptions.  Empty lists, arrays, sequences, etc are
>> 1007:     returned as <code>nullptr</code> which is C programming language
>> 1008:     <code>null</code> pointer.
> 
> Shouldn't this be "NULL"?  In any case, I think it would be helpful to expand this a bit to make it clear that usages of "nullptr" in parameter and error descriptions should be read or treated as  "NULL" when developing an agent in C rather than C++.

Yes, I think it should by NULL.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19257#discussion_r1603929609


More information about the serviceability-dev mailing list