A bug in the Vector API?

Quân Anh Mai anhmdq at gmail.com
Sun Sep 26 17:27:02 UTC 2021


Hi,

I don't know whether this is the correct place to report this. There seems
to be a bug in the implementation of `AbstractVector.resizeLanes0`. To be
more specific, the mask which is used to remove the sign extension of the
signed cast is created as `long mask = -1L >>> sizeChange;`. However, this
results in a very large value of mask which will be rejected by the
following broadcast. If I'm not mistaken, the mask should be created by
`long mask = -1L >>> -dsp.elementSize();` instead.

Steps to reproduce:
- Use vector unsigned casts in the form of
someVector.convertShape(VectorOperators.ZERO_EXTEND_...).
- The operation will then throw IllegalArgumentException.

Regards,
Quân Anh


More information about the panama-dev mailing list