8320383: refresh libraries cache on AIX in VMError::report

Reviewed-by: stuefe, mdoerr
This commit is contained in:
Matthias Baesken 2023-11-24 07:56:40 +00:00
parent fc314740e9
commit 26c3390421
6 changed files with 21 additions and 5 deletions

View File

@ -1017,6 +1017,10 @@ int os::current_process_id() {
// directory not the java application's temp directory, ala java.io.tmpdir.
const char* os::get_temp_directory() { return "/tmp"; }
void os::prepare_native_symbols() {
LoadedLibraries::reload();
}
// Check if addr is inside libjvm.so.
bool os::address_is_in_vm(address addr) {

View File

@ -895,6 +895,9 @@ bool os::address_is_in_vm(address addr) {
return false;
}
void os::prepare_native_symbols() {
}
bool os::dll_address_to_function_name(address addr, char *buf,
int buflen, int *offset,
bool demangle) {

View File

@ -1470,6 +1470,9 @@ bool os::address_is_in_vm(address addr) {
return false;
}
void os::prepare_native_symbols() {
}
bool os::dll_address_to_function_name(address addr, char *buf,
int buflen, int *offset,
bool demangle) {

View File

@ -1398,6 +1398,9 @@ const char* os::get_current_directory(char *buf, size_t buflen) {
return _getcwd(buf, n);
}
void os::prepare_native_symbols() {
}
//-----------------------------------------------------------
// Helper functions for fatal error handler
#ifdef _WIN64

View File

@ -671,6 +671,8 @@ class os: AllStatic {
static const char* get_temp_directory();
static const char* get_current_directory(char *buf, size_t buflen);
static void prepare_native_symbols();
// Builds the platform-specific name of a library.
// Returns false if the buffer is too small.
static bool dll_build_name(char* buffer, size_t size,

View File

@ -74,10 +74,6 @@
#include "jvmci/jvmci.hpp"
#endif
#ifdef AIX
#include "loadlib_aix.hpp"
#endif
#ifndef PRODUCT
#include <signal.h>
#endif // PRODUCT
@ -725,6 +721,11 @@ void VMError::report(outputStream* st, bool _verbose) {
"Runtime Environment to continue.");
}
// avoid the cache update for malloc/mmap errors
if (should_report_bug(_id)) {
os::prepare_native_symbols();
}
#ifdef ASSERT
// Error handler self tests
// Meaning of codes passed through in the tests.
@ -1347,7 +1348,7 @@ void VMError::report(outputStream* st, bool _verbose) {
void VMError::print_vm_info(outputStream* st) {
char buf[O_BUFLEN];
AIX_ONLY(LoadedLibraries::reload());
os::prepare_native_symbols();
report_vm_version(st, buf, sizeof(buf));