RFR (S): 8071996: split_if accesses NULL region of ConstraintCast

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Tue Feb 3 09:38:22 UTC 2015


Hi Vladimir, 

thanks for looking at this!

I updated the comment:
        // If the cast is derived from data flow edges, it may not have a control.
        // If so, it should be save to split. But follow-up code can not deal with
        // this (l. 359). So skip.
And uploaded a new webrev.
http://cr.openjdk.java.net/~goetz/webrevs/8071996-fixSplitIf/webrev.02/

Best regards,
  Goetz.

-----Original Message-----
From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On Behalf Of Vladimir Kozlov
Sent: Dienstag, 3. Februar 2015 00:08
To: hotspot-dev at openjdk.java.net
Subject: Re: RFR (S): 8071996: split_if accesses NULL region of ConstraintCast

Hi, Goetz

The fix is good but the comment is slightly off. It is not "region 
edge", it is "control edge". In current case it could be IfTrue or 
IfFalse projection nodes which points to If node which we compare.

Also this control edge is required:

  359     } else if( v->is_ConstraintCast() ) {
  360       proj = v->in(0);          // Controlling projection
  361     } else {
  362       assert( 0, "do not know how to handle this guy" );
  363     }
  364
  365     Node *proj_path_data, *proj_path_ctrl;
  366     if( proj->Opcode() == Op_IfTrue ) {

Thanks,
Vladimir

On 2/1/15 11:22 PM, Lindenmaier, Goetz wrote:
> Hi,
>
> I fixed a small bug in the C2 compiler.
> It appeared in our s390/zArch port running hs25.31 with jdk6 when executing
> jvm2008/compiler.compiler.
>
> Split_if encounters a ConstraintCast without region edge, which is a valid pattern.
> But it reads the region edge unconditionally, thus failing.
>
> Please review this change.  I please need a sponsor.
> http://cr.openjdk.java.net/~goetz/webrevs/8071996-fixSplitIf/webrev.01/
>
> Best regards,
>    Goetz.
>
>


More information about the hotspot-dev mailing list