Example:
var<private> a : array<f32, 0x40000000>; // 4 billion-ish byte big.
A similar thing can happen with a bigger element type but fewer of them.
Also
struct S {
[[size(0xfffffffc)]] a: i32;
b: i32; // byte offset overflows 32-bit
};
We'd like to be able to reject programs with data structures that are "too big", i.e. have overflowing sizes.
We already visited this somewhat in the max-array-size discussion, and I recall the judgement being "an implementation can reject unreasonably sized arrays", and nothing was added to the spec about that.
So these are two more cases that may fall into the same case.
There are at least a couple of options:
cc: @ben-clayton
Example:
A similar thing can happen with a bigger element type but fewer of them.
Also
We'd like to be able to reject programs with data structures that are "too big", i.e. have overflowing sizes.
We already visited this somewhat in the max-array-size discussion, and I recall the judgement being "an implementation can reject unreasonably sized arrays", and nothing was added to the spec about that.
So these are two more cases that may fall into the same case.
There are at least a couple of options:
cc: @ben-clayton