mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12
Reviewed-by: stuefe, gziemski
This commit is contained in:
parent
a74a839af0
commit
92d2176362
4 changed files with 38 additions and 12 deletions
|
@ -52,6 +52,12 @@ bool MachODecoder::demangle(const char* symbol, char *buf, int buflen) {
|
|||
|
||||
bool MachODecoder::decode(address addr, char *buf,
|
||||
int buflen, int *offset, const void *mach_base) {
|
||||
if (addr == (address)(intptr_t)-1) {
|
||||
// dladdr() in macOS12/Monterey returns success for -1, but that addr value
|
||||
// won't work in this function. Should have been handled by the caller.
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
struct symtab_command * symt = (struct symtab_command *)
|
||||
mach_find_command((struct mach_header_64 *)mach_base, LC_SYMTAB);
|
||||
if (symt == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue