Skip to content


8293344: JDK-8242181 broke stack printing for non-attached threads
Browse files Browse the repository at this point in the history
Reviewed-by: chagedorn, mdoerr
  • Loading branch information
tstuefe committed Sep 5, 2022
1 parent 2c61efe commit d4e3e69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/hotspot/share/utilities/elfFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "jvm_io.h"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "utilities/decoder.hpp"
#include "utilities/elfFile.hpp"
#include "utilities/elfFuncDescTable.hpp"
Expand Down Expand Up @@ -260,7 +259,7 @@ int ElfFile::section_by_name(const char* name, Elf_Shdr& hdr) {
assert(name != NULL, "No section name");
size_t len = strlen(name) + 1;
ResourceMark rm;
char* buf = NEW_RESOURCE_ARRAY(char, len);
char* buf = (char*)os::malloc(len, mtInternal);
if (buf == NULL) {
return -1;
Expand All @@ -282,6 +281,9 @@ int ElfFile::section_by_name(const char* name, Elf_Shdr& hdr) {


return sect_index;
Expand Down Expand Up @@ -350,7 +352,6 @@ ElfStringTable* ElfFile::get_string_table(int index) {
// Use unified logging to report errors rather than assert() throughout this method as this code is already part of the error reporting
// and the debug symbols might be in an unsupported DWARF version or wrong format.
bool ElfFile::get_source_info(const uint32_t offset_in_library, char* filename, const size_t filename_len, int* line, bool is_pc_after_call) {
ResourceMark rm;
if (!load_dwarf_file()) {
// Some ELF libraries do not provide separate .debuginfo files. Check if the current ELF file has the required
// DWARF sections. If so, treat the current ELF file as DWARF file.
Expand Down

1 comment on commit d4e3e69

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.