Fix potential integer handling issue in radixtree.h.
Masahiko Sawada <msawada@postgresql.org>
Fix potential integer handling issue in radixtree.h. Coverity complained about the integer handling issue; if we start with an arbitrary non-negative shift value, the loop may decrement it down to something less than zero before exiting. This commit adds an assertion to make sure the 'shift' is always 0 after the loop, and uses 0 as the shift to get the key chunk in the following operation. Introduced by ee1b30f12. Reported-by: Tom Lane as per coverity Reviewed-by: Tom Lane Discussion: https://postgr.es/m/2089517.1711299216%40sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/include/lib/radixtree.h | modified | +2 −1 |
Discussion
- [PoC] Improve dead tuple storage for lazy vacuum 462 messages · 2021-07-07 → 2024-05-08