model-writtenrun 415 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Lev Nikolaev reported that the bms_prev_member() range assertion multiplies signed integers before casting, producing a UBSan overflow report for a Bitmapset capable of containing INT_MAX #1.
- Lev explained that standard PostgreSQL builds use -fwrapv and therefore currently produce the expected assertion result, but proposed casting a->nwords before multiplication to match nearby unsigned arithmetic #1.
- Lev reported successful compilation and git diff --check, and omitted a regression test because the boundary requires an approximately 256 MB Bitmapset and the expression exists only in assertion-enabled builds #1.
- David Rowley committed the attached fix unchanged as c00d06417f, with the commit message specifying a backpatch through PostgreSQL 19.
- David confirmed that the issue was fixed in the final reply, leaving no outstanding work in the thread #2.