[all-commits] [llvm/llvm-project] 6812bc: [libc] Fix off by one in long double buffer size (...
michaelrj-google via All-commits
all-commits at lists.llvm.org
Tue Feb 6 11:16:24 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6812bc40bd6c70f7cae10d1e0a2aeac31cfaef03
https://github.com/llvm/llvm-project/commit/6812bc40bd6c70f7cae10d1e0a2aeac31cfaef03
Author: michaelrj-google <71531609+michaelrj-google at users.noreply.github.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M libc/src/__support/float_to_string.h
Log Message:
-----------
[libc] Fix off by one in long double buffer size (#80889)
The size for the long double BLOCK_BUFFER_LEN is calculated based on the
properties of the long double type. Somewhere in the calculation, the
result was mis-rounded so that the buffer was one element too small.
This patch fixes the issue and adds asserts to catch it sooner in the
future.
More information about the All-commits
mailing list