Details
-
Bug
-
Resolution: Fixed
-
P3
-
16
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8282344 | 11.0.15 | Matthias Baesken | P3 | Resolved | Fixed | b04 |
Description
if (lib->symtab && addr >= lib->base && addr < lib->base + lib->memsz) {
res = nearest_symbol(lib->symtab, addr - lib->base, poffset);
if (res) return res;
}
lib->memsz comes from the size of the LC_SEGMENT_64 that the library was discovered in. However, the library can actually span multiple segments. In this case of the vtable address, the address was in the segment that follows the initial LC_SEGMENT_64. Because of this lib->memsz is too small, resulting in symbol lookups being restricted to addresses that are in the initial segment.
The simplest approach to fixing this seems to be locating the largest offset found in the symbol table, round that up to a page boundary, and use it as lib->memsz. I've implemented this and it seems to be working.
Note the test for this will come when I finally have all issues like these resolved and can push my changes for
Attachments
Issue Links
- backported by
-
JDK-8282344 JDK-8247515 fix for OSX pc_to_symbol() lookup fails with some symbols
-
- Resolved
-
- relates to
-
JDK-8247515 OSX pc_to_symbol() lookup does not work with core files
-
- Resolved
-