Mercurial > hg > truffle
changeset 21108:5d7a2915c96c
Check for placeholder bci even when asserts are disabled
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 23 Apr 2015 17:17:52 -0700 |
parents | ec894427332d |
children | 05e3ec9d5aa2 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotDebugInfoBuilder.java |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotDebugInfoBuilder.java Thu Apr 23 12:55:54 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotDebugInfoBuilder.java Thu Apr 23 17:17:52 2015 -0700 @@ -26,6 +26,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.compiler.common.*; import com.oracle.graal.compiler.gen.*; import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; @@ -62,7 +63,10 @@ @Override protected BytecodeFrame computeFrameForState(FrameState state) { - assert !isPlaceholderBci(state.bci) || state.bci == BytecodeFrame.BEFORE_BCI : BytecodeFrame.getPlaceholderBciName(state.bci); + if (isPlaceholderBci(state.bci) && state.bci != BytecodeFrame.BEFORE_BCI) { + // This is really a hard error since an incorrect state could crash hotspot + throw GraalInternalError.shouldNotReachHere("Invalid state " + BytecodeFrame.getPlaceholderBciName(state.bci) + " " + state); + } return super.computeFrameForState(state); } }