United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7140882 Don't return booleans from methods returning pointers
JDK-7140882 : Don't return booleans from methods returning pointers

Details
Type:
Bug
Submit Date:
2012-01-30
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2012-02-04
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b13)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
The methods constantPoolOopDesc::method_at_if_loaded() and  CountedLoopNode::match_incr_with_optional_truncation() both have "return false" statements even though their actual return values are pointers (methodOop and Node*).

This is wrong and it will cause builds to fail with GCC 4.7.

                                    

Comments
EVALUATION

Change "return false" to "return NULL".

Patch provided by Deepak Bhole.
                                     
2012-01-30
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f457154eee8b
                                     
2012-01-30
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/f457154eee8b
                                     
2012-02-03
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/f457154eee8b
                                     
2012-03-22



Hardware and Software, Engineered to Work Together