Commit 90d6313
Fix underflow in sizeBucketsPowerAndLocksPower()
Summary: If `cacheEntries` is too small, `bucketsPower_` will be less than 10. Since `bucketsPower_` is unsigned, it will underflow if we subtract 10 from it.
Reviewed By: jaesoo-fb
Differential Revision: D50994522
fbshipit-source-id: 55151fdab1982442a706267b3dd3a0bb6a6fd6e71 parent 0238600 commit 90d6313
File tree
2 files changed
+6
-1
lines changed- cachelib/allocator
- tests
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
0 commit comments