Skip to content

Commit 07fe68f

Browse files
committed
Avoid deallocating invalid line_number_table
1 parent e5ef83e commit 07fe68f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ddprof-lib/src/main/cpp/flightRecorder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ void Lookup::fillJavaMethodInfo(MethodInfo *mi, jmethodID method,
366366
TEST_LOG("Failed to allocate %zu bytes for line number table copy", bytes);
367367
}
368368
} else {
369+
line_number_table = nullptr; // make sure the invalid address is not used for jvmti->Deallocate
369370
Counters::increment(LINE_NUMBER_TABLE_UNREADABLE);
370371
}
371372
}

0 commit comments

Comments
 (0)