This is an automated email from the ASF dual-hosted git repository.
tlopex pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-ffi.git
The following commit(s) were added to refs/heads/main by this push:
new 5481551c [FFI][FIX] Use int64_t for the parsed TVM_TRACEBACK_LIMIT
(#765)
5481551c is described below
commit 5481551c2cab3073db218dbbef1b785c5f810734
Author: Tianqi Chen <[email protected]>
AuthorDate: Mon Sep 7 22:01:56 2026 -0400
[FFI][FIX] Use int64_t for the parsed TVM_TRACEBACK_LIMIT (#765)
clang-tidy `google-runtime-int` rejects the `long` introduced in #763 at
`backtrace_utils.h:47`. Store the `strtol` result in `int64_t`; the
range check is unchanged.
---
src/ffi/backtrace_utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ffi/backtrace_utils.h b/src/ffi/backtrace_utils.h
index 16135c35..30d6d99b 100644
--- a/src/ffi/backtrace_utils.h
+++ b/src/ffi/backtrace_utils.h
@@ -44,7 +44,7 @@ namespace ffi {
inline int32_t GetBacktraceLimit() {
if (const char* env = std::getenv("TVM_TRACEBACK_LIMIT")) {
char* end = nullptr;
- long value = std::strtol(env, &end, 10); // NOLINT(runtime/int)
+ int64_t value = std::strtol(env, &end, 10);
// An empty, non-numeric, negative, or out-of-range value falls back to the
// default rather than throwing from inside the error reporter.
if (end != env && *end == '\0' && value >= 0 && value <= INT32_MAX) {