Re: [jdk22] RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-07 Thread Paul Sandoz
On Wed, 7 Feb 2024 09:13:33 GMT, Aleksey Shipilev wrote: > Looks fine. Thanks! - PR Comment: https://git.openjdk.org/jdk22/pull/109#issuecomment-1932769043

Re: [jdk22] RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-07 Thread Aleksey Shipilev
On Tue, 6 Feb 2024 16:50:10 GMT, Paul Sandoz wrote: > This pull request contains a backport of commit > [1ae85138](https://github.com/openjdk/jdk/commit/1ae851387f881263ccc6aeace5afdd0f49d41d33) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported w

[jdk22] RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-06 Thread Paul Sandoz
This pull request contains a backport of commit [1ae85138](https://github.com/openjdk/jdk/commit/1ae851387f881263ccc6aeace5afdd0f49d41d33) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Paul Sandoz on 2 Feb 2024 and was reviewed by Ma

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments [v2]

2024-02-01 Thread Paul Sandoz
On Thu, 1 Feb 2024 12:22:10 GMT, Maurizio Cimadamore wrote: >> My expectation is the risk is small, but of course non-zero. These tests can >> be expensive to run so i was trying balance the risk without increasing test >> execution times. >> >> I could strengthen the comment from: >> >>

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments [v2]

2024-02-01 Thread Paul Sandoz
> The implementation of method `VectorSpecies::fromMemorySegment`, in > `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on > the offset argument when the method is compiled by C2 (bounds checks are > performed when interpreted and by C1). > > This is an oversight and exp

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-01 Thread Maurizio Cimadamore
On Wed, 31 Jan 2024 00:34:40 GMT, Paul Sandoz wrote: >> test/jdk/jdk/incubator/vector/templates/X-LoadStoreTest.java.template line >> 271: >> >>> 269: @DontInline >>> 270: static $abstractvectortype$ fromArray($type$[] a, int i) { >>> 271: return ($abstractvectortype$) SPECIES.f

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-01 Thread Jatin Bhateja
On Mon, 29 Jan 2024 19:45:41 GMT, Paul Sandoz wrote: > The implementation of method `VectorSpecies::fromMemorySegment`, in > `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on > the offset argument when the method is compiled by C2 (bounds checks are > performed when in

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-01-30 Thread Paul Sandoz
On Wed, 31 Jan 2024 00:10:26 GMT, Maurizio Cimadamore wrote: >> The implementation of method `VectorSpecies::fromMemorySegment`, in >> `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on >> the offset argument when the method is compiled by C2 (bounds checks are >> perf

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-01-30 Thread Maurizio Cimadamore
On Mon, 29 Jan 2024 19:45:41 GMT, Paul Sandoz wrote: > The implementation of method `VectorSpecies::fromMemorySegment`, in > `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on > the offset argument when the method is compiled by C2 (bounds checks are > performed when in

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-01-30 Thread Maurizio Cimadamore
On Mon, 29 Jan 2024 19:45:41 GMT, Paul Sandoz wrote: > The implementation of method `VectorSpecies::fromMemorySegment`, in > `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on > the offset argument when the method is compiled by C2 (bounds checks are > performed when in

RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-01-29 Thread Paul Sandoz
The implementation of method `VectorSpecies::fromMemorySegment`, in `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on the offset argument when the method is compiled by C2 (bounds checks are performed when interpreted and by C1). This is an oversight and explicit bounds