[compiler-rt] [scudo] change allocation buffer size with env var (PR #71703)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 01:46:11 PST 2023
================
@@ -136,8 +143,17 @@ bool FlagParser::runHandler(const char *Name, const char *Value) {
break;
case FlagType::FT_int:
char *ValueEnd;
- *reinterpret_cast<int *>(Flags[I].Var) =
- static_cast<int>(strtol(Value, &ValueEnd, 10));
+ long V = strtol(Value, &ValueEnd, 10);
+ static_assert(INT_MAX <= LONG_MAX);
----------------
fmayer wrote:
Yes, the standard says this, but this is machine-checked documentation that this is the case.
https://github.com/llvm/llvm-project/pull/71703
More information about the llvm-commits
mailing list