> The SampledObjectAlloc event is called before object is cloned. It might 
> potentially cause the issues because Clone() implementation might rely on the 
> fact that object is not updated before creation an updating by clone. 
> 
> The proposed fix is to call SampledObjectAlloc after clone is completed like 
> it is done for VMObjectAlloc. Thus clone is atomic and can't be interrupted 
> by Java code.
> 
> The JVMTI specification is not specific to the exact time when the event is 
> called. 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Leonid Mesnik has updated the pull request incrementally with one additional 
commit since the last revision:

  the fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/33483/files
  - new: https://git.openjdk.org/jdk/pull/33483/files/5f49e959..e7923be2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=33483&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33483&range=00-01

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/33483.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33483/head:pull/33483

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

Reply via email to