about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorColin Baumgarten <colin.baumgarten@gmail.com>2022-10-01 00:40:59 +0200
committerColin Baumgarten <colin.baumgarten@gmail.com>2022-10-01 01:05:01 +0200
commitb9e85bf60ab4376a321f03078c06cd95ea5143ef (patch)
treed5e0b17555b953ef234b34452d8f3a601e0b8323 /compiler/rustc_codegen_llvm/src
parent75d3027fb5ce1af6712e4503c9574802212101bd (diff)
downloadrust-b9e85bf60ab4376a321f03078c06cd95ea5143ef.tar.gz
rust-b9e85bf60ab4376a321f03078c06cd95ea5143ef.zip
Detect and reject out-of-range integers in format string literals
Until now out-of-range integers in format string literals
were silently ignored. They wrapped around to zero at
usize::MAX, producing unexpected results.

When using debug builds of rustc, such integers in format string
literals even cause an 'attempt to add with overflow' panic in
rustc.

Fix this by producing an error diagnostic for integers in format
string literals which do not fit into usize.

Fixes #102528
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions