Commit dc64a27
authored
fix(bls): size pairing buffers for 32-bit targets (#531)
## Summary
- compute the 384-bit BLST field size independently of pointer width
- keep pointer-width sizing only for the `DST` and `DST_len` fields
## Why
`Pairing.sizeOf()` divided a 384-bit field width by `@sizeOf(usize)`.
This happened to produce the correct 48-byte field size on 64-bit
targets, but produced 96 bytes on 32-bit targets. BLST represents the
field as either six 64-bit limbs or twelve 32-bit limbs, so its size
remains 48 bytes.
The old calculation therefore reserved a 6352-byte pairing context on
32-bit targets instead of BLST's 3184 bytes. This was safe but doubled
every pairing buffer, including the worker pool's buffer array.
This was identified while discussing 32-bit capacity handling in
#522 (comment).1 parent a83741a commit dc64a27
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments