JDK-8214125 : [test] Fix comparison between pointer and integer in test_ptrQueueBufferAllocator.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-11-20
  • Updated: 2018-11-26
  • Resolved: 2018-11-20
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 12
12 b21Fixed
Related Reports
Relates :  
Description
Change JDK-8213352 introduced an gtest which does a comparison between an integer and a pointer which is forbidden in C++:

    ASSERT_EQ(NULL, nodes[i]->next());

I don't know why other compilers havn't complained about it, but XLC did.

The fix for this is trivial - just cast NULL to the appropriate pointer type:

    ASSERT_EQ((BufferNode*)NULL, nodes[i]->next());