[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8304725: AsyncGetCallTrace can cause SIGBUS on M1 [v4]
From:       David Holmes <dholmes () openjdk ! org>
Date:       2023-03-28 4:27:35
Message-ID: vb_tJw87lxdss47u5gpDqse7T7egoknVVhfyyxoCsC8=.9ce0ab34-ea43-41e4-a451-9e87aa56fa98 () github ! com
[Download RAW message or body]

On Fri, 24 Mar 2023 10:35:36 GMT, Johannes Bechberger <jbechberger@openjdk.org> \
wrote:

> > Fixes the issue by transitioning the thread into the WXWrite mode while walking \
> > the stack in AsyncGetCallTrace. 
> > Tested on my M1 mac.
> 
> Johannes Bechberger has updated the pull request incrementally with two additional \
> commits since the last revision: 
> - Remove misc lines
> - Disable caching in ASGCT

Changes requested by dholmes (Reviewer).

src/hotspot/share/runtime/thread.hpp line 641:

> 639:   void set_in_asgct(bool value) { _in_asgct = value; }
> 640:   static bool current_in_asgct() {
> 641:     Thread *cur = Thread::current();

You need to use`current_or_null_safe` here as you may be in a signal handling \
context.

src/hotspot/share/runtime/thread.hpp line 651:

> 649:  public:
> 650:   ThreadInAsgct(Thread* thread) : _thread(thread) {
> 651:     assert(thread != NULL, "invariant");

s/NULL/nullptr/

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

PR Review: https://git.openjdk.org/jdk/pull/13144#pullrequestreview-1360181938
PR Review Comment: https://git.openjdk.org/jdk/pull/13144#discussion_r1150010290
PR Review Comment: https://git.openjdk.org/jdk/pull/13144#discussion_r1150010653


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic