提交 b1dea640 编写于 作者: N never

7130676: Tiered: assert(bci == 0 || 0<= bci && bci<code_size()) during stack trace construction

Reviewed-by: kvn, iveresov
上级 c2f73d1b
...@@ -1347,7 +1347,13 @@ class BacktraceBuilder: public StackObj { ...@@ -1347,7 +1347,13 @@ class BacktraceBuilder: public StackObj {
return _backtrace(); return _backtrace();
} }
inline void push(methodOop method, short bci, TRAPS) { inline void push(methodOop method, int bci, TRAPS) {
// Smear the -1 bci to 0 since the array only holds unsigned
// shorts. The later line number lookup would just smear the -1
// to a 0 even if it could be recorded.
if (bci == SynchronizationEntryBCI) bci = 0;
assert(bci == (jushort)bci, "doesn't fit");
if (_index >= trace_chunk_size) { if (_index >= trace_chunk_size) {
methodHandle mhandle(THREAD, method); methodHandle mhandle(THREAD, method);
expand(CHECK); expand(CHECK);
...@@ -1574,8 +1580,13 @@ void java_lang_Throwable::fill_in_stack_trace_of_preallocated_backtrace(Handle t ...@@ -1574,8 +1580,13 @@ void java_lang_Throwable::fill_in_stack_trace_of_preallocated_backtrace(Handle t
int chunk_count = 0; int chunk_count = 0;
for (;!st.at_end(); st.next()) { for (;!st.at_end(); st.next()) {
// add element // Add entry and smear the -1 bci to 0 since the array only holds
bcis->ushort_at_put(chunk_count, st.bci()); // unsigned shorts. The later line number lookup would just smear
// the -1 to a 0 even if it could be recorded.
int bci = st.bci();
if (bci == SynchronizationEntryBCI) bci = 0;
assert(bci == (jushort)bci, "doesn't fit");
bcis->ushort_at_put(chunk_count, bci);
methods->obj_at_put(chunk_count, st.method()); methods->obj_at_put(chunk_count, st.method());
chunk_count++; chunk_count++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册