On Sat, 3 Sep 2022 07:48:50 GMT, Dean Long <dl...@openjdk.org> wrote:

> Wouldn't the SA stack walk fail when attaching to a core dump from an earlier 
> JVM that does not exclude nulls?

I'm not sure how important compatibility is with older JVMs. SA is capable of 
(if properly maintained) connecting to any JVM. You'll see signs of that in the 
code:

    // The threadStatus is only present starting in 1.5
    if (threadStatusField != null) {
      Oop holderOop = threadHolderField.getValue(threadOop);
      return (int) threadStatusField.getValue(holderOop);
    } else {
      // All we can easily figure out is if it is alive, but that is
      // enough info for a valid unknown status.
      ...
    }

However, attempts like this one are ancient, and certainly this one should be 
removed. There's probably a 100 other reasons why attaching to a 1.5 JVM won't 
work.

We don't do any compatibility testing with older JVMs. For the most part I'd 
say SA users should always match SA with the version of the JVM they are 
targeting. I'd be interested in hearing if anyone feels otherwise.

-------------

PR: https://git.openjdk.org/jdk/pull/10067

Reply via email to