From 241120d94d695fb9fe82ae7093c6e9f17fe2a431 Mon Sep 17 00:00:00 2001 From: xjqbest <173596896@qq.com> Date: Tue, 16 Apr 2019 14:44:49 +0800 Subject: [PATCH] fix bug of num > INT_MAX --- paddle/fluid/framework/data_feed.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index 6b0404134..7529b7578 100644 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -546,7 +546,7 @@ bool MultiSlotDataFeed::CheckFile(const char* filename) { VLOG(0) << "please check line<" << instance_cout << "> in file<" << filename << ">"; return false; - } else if (errno == ERANGE) { + } else if (errno == ERANGE || num > INT_MAX) { VLOG(0) << "error: the number of ids greater than INT_MAX"; VLOG(0) << "please check line<" << instance_cout << "> in file<" << filename << ">"; -- GitLab