RFR: 8294316: SA core file support is broken on macosx-x64 starting with macOS 12.x [v2]
Chris Plummer
cjplummer at openjdk.org
Mon Jun 26 05:09:05 UTC 2023
On Fri, 23 Jun 2023 19:31:20 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> This is a minor fix to core file reading on macos x. I can confirm that after this fix I can run the problem listed SA core file tests on Ventura.
>
> Tom Rodriguez has updated the pull request incrementally with three additional commits since the last revision:
>
> - Flatten nested ifs
> - Adjust ordering of message
> - Adjust printing
src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c line 302:
> 300: // The base of the library is offset by a random amount which ends up as a load command with a
> 301: // filesize of 0. This must be ignored otherwise the base address of the library is wrong.
> 302: if (segcmd.filesize != 0 && add_map_info(ph, fd, segcmd.fileoff, segcmd.vmaddr, segcmd.vmsize, segcmd.flags) == NULL) {
I actually preferred this part with two `if` statements. Seems easier to read that way.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14569#discussion_r1241570338
More information about the serviceability-dev
mailing list