8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"

Tolerate JVMCI placeholder bcis

Reviewed-by: kvn, never, dlong
This commit is contained in:
Igor Veresov 2018-06-22 15:58:32 -07:00
parent b84c23399e
commit 90c4e07b60
7 changed files with 48 additions and 11 deletions

View file

@ -690,12 +690,10 @@ objArrayHandle Method::resolved_checked_exceptions_impl(Method* method, TRAPS) {
int Method::line_number_from_bci(int bci) const {
if (bci == SynchronizationEntryBCI) bci = 0;
assert(bci == 0 || 0 <= bci && bci < code_size(), "illegal bci");
int best_bci = 0;
int best_line = -1;
if (has_linenumber_table()) {
if (bci == SynchronizationEntryBCI) bci = 0;
if (0 <= bci && bci < code_size() && has_linenumber_table()) {
// The line numbers are a short array of 2-tuples [start_pc, line_number].
// Not necessarily sorted and not necessarily one-to-one.
CompressedLineNumberReadStream stream(compressed_linenumber_table());