8281222: ciTypeFlow::profiled_count fails "assert(0 <= i && i < _len) failed: illegal index"

Reviewed-by: roland, chagedorn, thartmann
This commit is contained in:
Rickard Bäckman 2022-03-28 07:34:11 +00:00
parent c2c0cb2a43
commit 66f1da1885

View File

@ -2460,7 +2460,7 @@ int ciTypeFlow::profiled_count(ciTypeFlow::Loop* loop) {
return 0;
}
ciTypeFlow::Block* tail = loop->tail();
if (tail->control() == -1) {
if (tail->control() == -1 || tail->has_trap()) {
return 0;
}