model-writtenrun 3851 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that dividing a large interval by a small number triggered an undefined floating-point-to-integer conversion and could return bogus results, with sanitizer failures also occurring on older branches #1.
- Laurenz Albe proposed checking the month and day division results against integer limits before conversion in interval_div() #2.
- Dean Rasheed explained that division needed all the overflow protections used by multiplication and that both functions also lacked checks when cascading fractional units downward #3.
- Dean Rasheed supplied a broader replacement covering conversion and cascading overflow in both functions, with regression tests, and advocated back-patching because the errors were easily triggered #4.
- Dean Rasheed committed that replacement unchanged as b218fbb7a3, covering all supported branches, and closed the thread by confirming that it had been pushed and back-patched #5.