JDK-8343800 : Cleanup definition of NULL_WORD
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-11-07
  • Updated: 2024-12-03
  • Resolved: 2024-12-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 masterFixed
Description
NULL_WORD exists to provide an integral value representing null, primarily as a literal in x86 assembly code.  (There are a small number of uses outside of x86 assembly code, some of which might be considered questionable.)

The definition of NULL_WORD varies by platform.  It's also a macro.  It seems like a sufficient definition for all platforms would be

const intptr_t NULL_WORD = 0;

In particular, it really ought not ever be defined as equivalent to NULL.

Comments
Changeset: 4ac2e477 Branch: master Author: Kim Barrett <kbarrett@openjdk.org> Date: 2024-12-03 04:54:51 +0000 URL: https://git.openjdk.org/jdk/commit/4ac2e477b9bb9995047718b7d8df36c3dc739a9d
03-12-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/22468 Date: 2024-12-01 07:54:49 +0000
01-12-2024