Commit c6b214a
committed
Loosen map reserve bound in regression test for STL bucket baseline
The unordered_map assertion used a tight <= payload.size() bound, but
unordered_map implementations pre-allocate a baseline bucket array
(MSVC's STL starts at 16), so CI failed on Windows with "reserve
requested 16 buckets for a 5-byte payload". The vector case has no such
baseline and is unaffected.
Use a generous constant ceiling (1024) for the bucket allocation, which
still cleanly separates a bounded reservation from the multi-billion-bucket
bug: verified the test still fails (~2^32 buckets requested) when the cap
is removed.1 parent feda27a commit c6b214a
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
519 | 523 | | |
520 | 524 | | |
521 | 525 | | |
| |||
0 commit comments