mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 17:36:30 +00:00

snprintf interceptors call `format_buffer` with `size==~0ul`, which may eventually lead to `snprintf(s, n, "Hello world!")` where `s+n` wraps around. Since glibc 2.37 (https://sourceware.org/PR30441), the snprintf call does not write the last char. musl snprintf returns -1 with EOVERFLOW when `n > INT_MAX`. Change `size` to INT_MAX to work with glibc 2.37+ and musl. snprintf interceptors are not changed. It's user responsibility to not cause a compatibility issue with libc implementations. Fix #60678
Compiler-RT ================================ This directory and its subdirectories contain source code for the compiler support routines. Compiler-RT is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. ================================